Fix bug where --branches
flag doesn't exist for some versions of gi…
#234
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: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
setup-environment: | |
name: Set env vars | |
runs-on: ubuntu-latest | |
outputs: | |
cargo_cache_key: ${{ steps.cargo_cache_key.outputs.value }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set cargo cache key | |
id: cargo_cache_key | |
run: | | |
CARGO_CACHE_KEY="${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}" | |
echo "value=$CARGO_CACHE_KEY" >> $GITHUB_OUTPUT | |
lint: | |
needs: setup-environment | |
uses: ./.github/workflows/lint.yml | |
with: | |
cache-key: ${{ needs.setup-environment.outputs.cargo_cache_key }} | |
test: | |
needs: setup-environment | |
uses: ./.github/workflows/test.yml | |
with: | |
cache-key: ${{ needs.setup-environment.outputs.cargo_cache_key }} |