Repository navigation
70 lines (70 loc) · 1.89 KB
/
Copy pathtest.yaml
File metadata and controls
70 lines (70 loc) · 1.89 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
59
60
61
62
63
64
65
66
67
68
69
70
name: PR Validation
permissions:
contents: read
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
precommit:
name: Static Analysis/Linting/Prettifier
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.draft == false }}
steps:
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-python@v7
with:
python-version: 3.9
- uses: pre-commit/action@v3.0.1
with:
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
worker-tests:
name: Report Worker Tests
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.draft == false }}
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7
with:
node-version: 22
- run: node --test
working-directory: tools/report_worker
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.draft == false }}
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: Build Docker image
run: make build
- name: Start Docker container
run: make run
- name: Install dependencies
run: make install
- name: Running tests with coverage
run: make test-coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
override_branch: main
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
override_branch: main
- name: Cleanup
if: always()
run: make clean