-
Notifications
You must be signed in to change notification settings - Fork 203
70 lines (58 loc) · 1.86 KB
/
integration-tests.yml
File metadata and controls
70 lines (58 loc) · 1.86 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: integration-tests
on:
pull_request:
branches:
- 'master'
- 'develop'
jobs:
list-integration-tests:
runs-on: ubuntu-latest
outputs:
test_files: ${{ steps.list.outputs.test_files }}
steps:
- uses: actions/checkout@v5
- id: list
uses: ./.github/actions/list-tests-dir
with:
test_dir: tests/integration
output_prefix: integration/
integration-tests:
needs: list-integration-tests
runs-on: ubuntu-22.04
timeout-minutes: 1800
container:
image: stratosphereips/slips_dependencies
# TensorFlow + multiprocessing + pytest -n can hit /dev/shm limits.
options: --shm-size=2g
# suppress tensorflow warnings
env:
TF_CPP_MIN_LOG_LEVEL: 3
TF_ENABLE_ONEDNN_OPTS: 0
strategy:
fail-fast: false
matrix:
test_file: ${{ fromJson(needs.list-integration-tests.outputs.test_files) }}
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Start Redis
uses: ./.github/actions/start-redis
- name: Run Integration Tests for ${{ matrix.test_file }}
run: |
python3 -m pytest tests/${{ matrix.test_file }} -p no:warnings -vv -s -n 3
- name: Build Artifact Name
# otherwise we get numeric names for the artifacts and we dont know which is which
id: artifact-name
run: |
sanitized_test_file="${{ matrix.test_file }}"
sanitized_test_file=$(printf '%s\n' "$sanitized_test_file" | tr '/' '_')
echo "name=${sanitized_test_file}-integration-output" >> "$GITHUB_OUTPUT"
- name: Upload Artifacts
if: always()
uses: actions/upload-artifact@v6
with:
name: ${{ steps.artifact-name.outputs.name }}
path: |
output/integration_tests