-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (36 loc) · 1.24 KB
/
ci.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
name: CI
on: pull_request
jobs:
ci:
name: Automated tests
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install libpq, poetry and geckodriver
run: |
sudo apt-get install -y libpq-dev
curl -sSL https://install.python-poetry.org | python3 -
poetry install -E pgsql -E gunicorn
curl -sSL 'https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz' -o /tmp/gd.tgz
sudo tar -zxf /tmp/gd.tgz -C /usr/local/share
sudo chmod +x /usr/local/share/geckodriver
sudo ln -s /usr/local/share/geckodriver /usr/local/bin/geckodriver
- name: Collect static files
run: |
poetry run python manage.py collectstatic
- name: Run tests and capture coverage stats
run: |
poetry run coverage run manage.py test
env:
MOZ_HEADLESS: 1
- uses: codecov/codecov-action@v3
with:
files: ./.coverage