-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (58 loc) · 1.78 KB
/
integration.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
name: Integration tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
integration-test:
name: Run integration tests
runs-on: [goth2]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure python
continue-on-error: true
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install gcc
run: sudo apt-get install -y gcc g++ make
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1
- name: Install dependencies
run: poetry install
# Only relevant for self-hosted runners
- name: Cleanup Docker
if: always()
run: |
c=$(docker ps -q) && [[ $c ]] && docker kill $c
docker system prune -af
- name: Log in to GitHub Docker repository
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{github.actor}} --password-stdin
- name: Run integration tests
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: poetry run poe tests_integration
- name: Upload test logs
uses: actions/upload-artifact@v3
if: always()
with:
name: goth-logs
path: /tmp/goth-tests
# Only relevant for self-hosted runners
- name: Remove test logs
if: always()
run: rm -rf /tmp/goth-tests
# Only relevant for self-hosted runners
- name: Remove poetry virtual env
if: always()
run: poetry env remove --all
# Only relevant for self-hosted runners
- name: Cleanup Docker
if: always()
run: |
c=$(docker ps -q) && [[ $c ]] && docker kill $c
docker system prune -af