-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (46 loc) · 1.32 KB
/
tests.yaml
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
38
39
40
41
42
43
44
45
46
name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Deps
id: cache-deps
uses: actions/cache@v3
with:
path: build-cache
key: ${{ runner.os }}-${{ hashFiles('Cargo.toml', 'front-line*/Cargo.toml', '.pre-commit-config.yaml', 'dev.docker') }}
- name: Pull and build deps
if: steps.cache-deps.outputs.cache-hit != 'true'
run: make build-ci
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Restore cache
uses: actions/cache/restore@v3
with:
path: build-cache
key: ${{ runner.os }}-${{ hashFiles('Cargo.toml', 'front-line*/Cargo.toml', '.pre-commit-config.yaml', 'dev.docker') }}
- name: Run tests
run: make test-ci
pre-commit:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Restore cache
uses: actions/cache/restore@v3
with:
path: build-cache
key: ${{ runner.os }}-${{ hashFiles('Cargo.toml', 'front-line*/Cargo.toml', '.pre-commit-config.yaml', 'dev.docker') }}
- name: Run pre-commit
run: make pre-commit-ci