-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.29 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
44
45
46
47
name: CI
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Python requirements
run: poetry install
- name: Lint Python
run: |
poetry run isort . --diff --verbose
poetry run black . --check --verbose
poetry run flake8 . --verbose
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Get fixtures
run: cd .. && git clone https://github.com/nationalarchives/tna-frontend.git
- name: Install Python requirements
run: poetry install
- name: Install Node dependencies
run: cd tasks && npm install
- name: Run server
run: poetry run flask --app tna-frontend-jinja run --debug --port 5000 &
- name: Run the tests
run: node ./tasks/test.mjs || exit 1