-
Notifications
You must be signed in to change notification settings - Fork 83
124 lines (104 loc) · 2.83 KB
/
tests.yml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install secator
uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
- name: Run lint tests
run: |
secator test lint
unit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install secator
uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
- name: Run unit tests
run: |
secator test unit
- name: Archive code coverage results
uses: actions/upload-artifact@v4
if: ${{ matrix.python-version == '3.11' }}
with:
name: coverage-unit
include-hidden-files: true
path: .coverage.unit
integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install secator
uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
- name: Setup docker compose
uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: '1.29.2'
- name: Add GOBIN to PATH
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Add GOPATH to PATH
run: echo "${HOME}/go/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
secator install langs go
secator install langs ruby
secator install tools
secator install addons worker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # to avoid being rate-limited when fetching GitHub releases
- name: Run integration tests
run: |
secator test integration --test test_celery,test_worker,test_tasks
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-integration
include-hidden-files: true
path: .coverage.integration
coverage:
runs-on: ubuntu-latest
needs: [ unit, integration]
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install secator
uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Run coverage report
run: |
secator test coverage