feat: add shell completion and manpage support #162
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Quality Control | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
~/.rustup | |
target/ | |
key: ${{ runner.os }}-${{ steps.rust-install.outputs.cachekey }}-check | |
- name: Install rust | |
id: rust-install | |
uses: dtolnay/rust-toolchain@stable | |
- name: Check Formatting | |
run: | | |
cargo +${{ steps.rust-install.outputs.name }} fmt --check | |
- name: Check with Clippy | |
run: | | |
cargo +${{ steps.rust-install.outputs.name }} clippy -- -D warnings | |
- name: Check docs | |
run: | | |
cargo +${{ steps.rust-install.outputs.name }} rustdoc -- -D warnings | |
- name: Shellcheck | |
uses: ludeeus/action-shellcheck@master | |
with: | |
# Ignore any completions in ./target/debug/build/*/out/completions | |
ignore_paths: >- | |
./target/debug/build/*/out/completions | |
- name: Install shfmt | |
uses: mfinelli/setup-shfmt@master | |
- name: Run shfmt | |
run: shfmt -d bin/* test/run | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Lint (Prettier) | |
run: npm run lint | |
build: | |
strategy: | |
matrix: | |
rust-toolchain: | |
- stable | |
- nightly | |
- 1.74.1 | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
~/.rustup | |
target/ | |
key: ${{ runner.os }}-${{ steps.rust-install.outputs.cachekey }}-build | |
- name: Install rust | |
id: rust-install | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
- name: Build | |
run: | | |
cargo +${{ steps.rust-install.outputs.name }} build --release --all-features | |
test: | |
strategy: | |
matrix: | |
rust-toolchain: | |
- stable | |
- nightly | |
os: | |
- ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
~/.rustup | |
target/ | |
key: ${{ runner.os }}-${{ steps.rust-install.outputs.cachekey }}-test | |
- name: Install rust | |
id: rust-install | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
- name: Build | |
run: | | |
cargo +${{ steps.rust-install.outputs.name }} build | |
- name: Run Testsuite | |
working-directory: "test" | |
run: ./run | |
build-test-node: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
~/.rustup | |
target/ | |
key: ${{ runner.os }}-${{ steps.rust-install.outputs.cachekey }}-test-node | |
- name: Install rust | |
id: rust-install | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version: 18 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Test | |
run: npm test | |
# nodejs support is experimental; don't fail the build for it | |
continue-on-error: true | |
actions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install action-validator with asdf | |
uses: asdf-vm/actions/install@v3 | |
with: | |
tool_versions: | | |
action-validator 0.5.1 | |
- name: Lint Actions | |
run: | | |
find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) \ | |
| xargs -I {} action-validator --verbose {} |