-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 904 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
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 }}
check-msrv:
uses: ./.github/workflows/msrv.yml