-
-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (39 loc) · 1002 Bytes
/
Copy pathtest.yml
File metadata and controls
44 lines (39 loc) · 1002 Bytes
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
name: Unit and Integration Tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create environment file
run: |
cat << 'ENVFILE' > .env
LISTEN_ADDR=0.0.0.0
LISTEN_PORT=8000
APP_VERSION=1.0
APP_TITLE=Mercury
APP_DESCRIPTION=Mercury API
API_VERSION=v1
POSTGRES_HOST=mercury_db
POSTGRES_PORT=5432
POSTGRES_DB=mercury
POSTGRES_USER=mercury
POSTGRES_PASSWORD=mercury
REDIS_HOST=mercury_cache
JWT_SECRET_KEY=test-secret-key
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
ENVFILE
- name: Run unit tests
run: setsid ./ci/unit-test.sh
- name: Run integration tests
run: setsid ./ci/integration-test.sh