-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (78 loc) · 2.33 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: "Run Tests"
on:
- push
- pull_request
jobs:
test-example-problem:
name: "Test Example Problem"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: "Install Application with pip"
run: pip install .
- name: "Run Problem Tester"
run: |
python -m algobowl.lib.problem_tester example_problems/number_in_range
migration-test:
name: "Migration Test"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: "Install Application with pip"
run: pip install .[dev]
- name: "Setup App"
run: gearbox setup-app -c development.ini.sample
- name: "Run Migration Test"
run: ./migration_test.sh
curl-test:
name: "Smoke Test App with cURL"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: "Install Application with pip"
run: pip install .[dev]
- name: "Setup App"
run: gearbox setup-app -c development.ini.sample
- name: "Run cURL test"
run: |
gearbox serve -c development.ini.sample --daemon
sleep 2
gearbox serve --status
sleep 2
curl -f http://127.0.0.1:8080/
curl -f http://127.0.0.1:8080/competition
curl -f http://127.0.0.1:8080/competition/archive
gearbox serve -c development.ini.sample --stop-daemon
black-check:
name: "Check source is formatted with Black"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: "Install black"
run: pip install black
- name: "Check source code is formatted with Black"
run: black --check --diff .
isort-check:
name: "Check source is formatted with isort"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: "Install isort"
run: pip install isort
- name: "Check source code is formatted with isort"
run: isort --check .