forked from lucyparsons/OpenOversight
-
Notifications
You must be signed in to change notification settings - Fork 11
58 lines (51 loc) 路 1.49 KB
/
Copy pathci.yml
File metadata and controls
58 lines (51 loc) 路 1.49 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
name: Lint and Test
on:
pull_request:
push:
branches:
- main
jobs:
static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v3
- uses: actions/setup-python@v5
with:
python-version: 3.11.5
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
tests:
runs-on: ubuntu-latest
needs: static-checks
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v3
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Cache Docker layers
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
# Use a hash of any files that affect the Docker build context
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile', 'docker-compose*.yml', 'poetry.lock', 'pyproject.toml') }}
# Fallback to a more generic key if the specific one is not found
restore-keys: |
${{ runner.os }}-buildx-
- name: Run tests
run: |
just build
just up
just test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-traces
path: build/test-results/
- if: ${{ failure() && github.event_name == 'pull_request' }}
name: Print logs
run: |
FOLLOW_LOGS='' just logs