-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.56 KB
/
integration-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
name: Integration Tests
on:
workflow_run:
workflows:
- "Commander Tests/Build"
branches:
- main
types:
- completed
jobs:
integration-test:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: Test
env:
ADMIN_HASH: ${{ secrets.ADMIN_HASH }}
APP_NAME: ${{ secrets.APP_NAME }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
REDIS_PASS: ${{ secrets.REDIS_PASS }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
PROXY_DOMAIN: ${{ secrets.PROXY_DOMAIN }}
LOG_LEVEL: ${{ secrets.LOG_LEVEL }}
WORKERS: ${{ secrets.WORKERS }}
WORKER_CONNECTIONS: ${{ secrets.WORKER_CONNECTIONS }}
PUID: ${{ secrets.PUID }}
PGID: ${{ secrets.PGID }}
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build containers
run: docker-compose -f docker-compose.test.yml build
- name: Deploy services
run: docker-compose -f docker-compose.test.yml up -d
- name: Run tests
run: docker-compose -f docker-compose.test.yml run sut pytest
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
with:
dest: './logs'
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs
- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz