-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.85 KB
/
unittest.yaml
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
name: run test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
id: cp310
with:
python-version: "3.10"
cache: 'poetry'
- run: echo '${{ steps.cp310.outputs.python-version }}'
- run: poetry install
- name: pre-commit
uses: pre-commit/[email protected]
- name: Install dependencies
run: |
poetry install
- name: Setup Postgres database
uses: Daniel-Marynicz/postgresql-action@master
with:
postgres_image_tag: 12-alpine
postgres_password: ${{ secrets.DB_PASS }}
- name: actions-setup-redis
uses: shogo82148/[email protected]
with:
redis-version: 4
auto-start: false
- name: Test with pytest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
KMS_KEY_ID: ${{ secrets.KMS_KEY_ID }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
GRAPHQL_PASSWORD: ${{ secrets.GRAPHQL_PASSWORD }}
HEADLESS_URL: ${{ secrets.HEADLESS_URL }}
DATA_PROVIDER_URL: ${{ secrets.DATA_PROVIDER_URL }}
HEADLESS_JWT_SECRET: ${{ secrets.HEADLESS_JWT_SECRET }}
HEADLESS_JWT_ISS: ${{ secrets.HEADLESS_JWT_ISS }}
HEADLESS_JWT_ALGORITHM: ${{ secrets.HEADLESS_JWT_ALGORITHM }}
PLANET_ID: ${{ secrets.PLANET_ID }}
run: |
poetry run pytest --redis-exec=$(which redis-server) --cov world_boss --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3