Add dogfood
test
#9
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: CI | |
on: | |
merge_group: | |
pull_request: | |
schedule: | |
- cron: "0 3 * * 0" # 0 = Sunday | |
workflow_dispatch: | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
environment: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.environment }} | |
defaults: | |
run: | |
shell: bash | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- name: Log github refs | |
run: | | |
echo '```' >> "$GITHUB_STEP_SUMMARY" | |
echo 'github.ref: ${{ github.ref }}' >> "$GITHUB_STEP_SUMMARY" | |
echo 'github.sha: ${{ github.sha }}' >> "$GITHUB_STEP_SUMMARY" | |
echo '```' >> "$GITHUB_STEP_SUMMARY" | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('.github/workflows/ci.yml', 'tests/ci.rs') }} | |
- name: Install tools | |
run: | | |
rm -f "$HOME"/.cargo/bin/cargo-fmt | |
rm -f "$HOME"/.cargo/bin/rustfmt | |
rustup update --no-self-update | |
rustup install nightly | |
rustup component add rustfmt --toolchain nightly | |
export CARGO_TARGET_DIR="$(mktemp -d)" | |
cargo install cargo-dylint dylint-link || true | |
cargo install cargo-hack || true | |
cargo install cargo-license || true | |
cargo install cargo-sort || true | |
- name: Test | |
run: cargo test | |
- name: Test with token | |
run: | | |
export GITHUB_TOKEN_PATH="$(mktemp)" | |
echo '${{ secrets.GITHUB_TOKEN }}' > "$GITHUB_TOKEN_PATH" | |
cargo test \ | |
--test rustsec_comparison \ | |
--test snapbox | |
all-checks: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- run: true |