-
Notifications
You must be signed in to change notification settings - Fork 35
102 lines (76 loc) · 2.4 KB
/
pr.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: PR checks
on: pull_request
jobs:
run-image:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Build image
run: DOCKER_BUILDKIT=1 docker build --tag netplan-io .
- name: Run image
run: |
docker run -d --env SECRET_KEY=dev-key -p 80:80 netplan-io
sleep 1
curl --head --fail --retry-delay 5 --retry 10 --retry-connrefused http://localhost
run-dotrun:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dotrun
uses: canonical/install-dotrun@main
- name: Install dependencies
run: dotrun install
- name: Build assets
run: dotrun build
- name: Run dotrun
run: |
dotrun & curl --head --fail --retry-delay 1 --retry 30 --retry-connrefused http://localhost:8024
lint-scss:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install --immutable
- name: Lint scss
run: yarn lint-scss
lint-python:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install node dependencies
run: yarn install --immutable
- name: Install python dependencies
run: |
python3 -m pip install --upgrade pip
sudo pip3 install flake8 black
- name: Lint python
run: yarn lint-python
test-python:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install requirements
run: |
sudo apt-get update && sudo apt-get install --yes python3-setuptools
sudo pip3 install -r requirements.txt
- name: Install dependencies
run: sudo pip3 install coverage
- name: Install node dependencies
run: yarn install --immutable
- name: Build resources
run: yarn build
- name: Run tests with coverage
run: |
SECRET_KEY=insecure_secret_key coverage run --source=. -m unittest discover tests
bash <(curl -s https://codecov.io/bash) -cF python
inclusive-naming-check:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: woke
uses: canonical-web-and-design/inclusive-naming@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
fail-on-error: true