move contents of taskchampion repo to tc/

This commit is contained in:
Dustin J. Mitchell 2022-05-08 19:01:20 +00:00
parent 73baefa0a5
commit 2a92b2a4b9
No known key found for this signature in database
219 changed files with 0 additions and 0 deletions

1
rust/.github/CODEOWNERS vendored Normal file
View file

@ -0,0 +1 @@
* @dbr @djmitche

11
rust/.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/" # Location of package manifests
schedule:
interval: "daily"

19
rust/.github/workflows/audit.yml vendored Normal file
View file

@ -0,0 +1,19 @@
name: Security
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
audit:
runs-on: ubuntu-latest
name: "Audit Dependencies"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

102
rust/.github/workflows/checks.yml vendored Normal file
View file

@ -0,0 +1,102 @@
name: Checks
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
jobs:
clippy:
runs-on: ubuntu-latest
name: "Clippy"
steps:
- uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
# Fixed version for clippy lints. Bump this as necesary. It must not
# be older than the MSRV in tests.yml.
toolchain: "1.57"
override: true
- uses: actions-rs/cargo@v1.0.1
with:
command: check
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
name: "Clippy Results"
mdbook:
runs-on: ubuntu-latest
name: "Documentation"
steps:
- uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
# if this changes, change it in cli/Cargo.toml and .github/workflows/publish-docs.yml as well
mdbook-version: '0.4.10'
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Create usage-docs plugin
run: cargo build -p taskchampion-cli --features usage-docs --bin usage-docs
- run: mdbook test docs
- run: mdbook build docs
fmt:
runs-on: ubuntu-latest
name: "Formatting"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

47
rust/.github/workflows/publish-docs.yml vendored Normal file
View file

@ -0,0 +1,47 @@
name: Docs
on:
push:
branches:
- main
jobs:
mdbook-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
# if this changes, change it in cli/Cargo.toml and .github/workflows/publish-docs.yml as well
mdbook-version: '0.4.10'
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Create usage-docs plugin
run: cargo build -p taskchampion-cli --features usage-docs --bin usage-docs
- run: mdbook build docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book

47
rust/.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,47 @@
name: Tests
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
jobs:
test:
strategy:
matrix:
rust:
# MSRV; most not be higher than the clippy rust version in checks.yml
- "1.47"
- "stable"
os:
- ubuntu-latest
- macOS-latest
- windows-latest
name: "Test - Rust ${{ matrix.rust }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: "${{ matrix.rust }}"
override: true
- name: test
run: cargo test