-
Notifications
You must be signed in to change notification settings - Fork 11
47 lines (41 loc) · 1.16 KB
/
run-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
47
name: CI Tests
# Controls when the workflow will run
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.event.inputs.base }}
filters: |
backend:
- 'leaktopus_backend/**'
frontend:
- 'leaktopus_frontend/**'
unit-tests:
needs: [ changes ]
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: pip install -r leaktopus_backend/requirements.txt
- name: Run unit tests
run: |
pytest --ignore leaktopus_backend/leaktopus/tests leaktopus_backend/leaktopus