Skip to content

Commit 107332c

Browse files
committed
Add names to github actions
Remove unnecessary matrix parameters
1 parent c2911d5 commit 107332c

File tree

3 files changed

+68
-65
lines changed

3 files changed

+68
-65
lines changed

.github/workflows/cypress.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
name: Cypress E2E
2+
23
on:
34
push:
4-
branches: [master]
5+
branches: [ master ]
56
pull_request:
6-
branches: [master]
7+
branches: [ master ]
8+
9+
env:
10+
PYTHON_VERSION: 3.9
11+
712
jobs:
813
cypress-run-chrome:
14+
name: Chrome tests (${{ matrix.containers }})
915
runs-on: ubuntu-latest
1016
strategy:
1117
matrix:
12-
python-version: [3.9]
13-
containers: [1, 2, 3, 4]
18+
containers: [ 1, 2, 3, 4 ]
1419
services:
1520
postgres:
1621
image: postgres:14
1722
env:
1823
POSTGRES_USER: postgres
1924
POSTGRES_PASSWORD: postgres
2025
POSTGRES_DB: csm_web_dev
21-
ports: ["5432:5432"]
26+
ports: [ "5432:5432" ]
2227
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2328
steps:
2429
- name: Checkout
2530
uses: actions/checkout@v3
26-
- name: Set up Python ${{ matrix.python-version }}
31+
- name: Set up Python ${{ env.PYTHON_VERSION }}
2732
uses: actions/setup-python@v4
2833
with:
29-
python-version: ${{ matrix.python-version }}
34+
python-version: ${{ env.PYTHON_VERSION }}
3035
- name: Install Python dependencies
3136
run: |
3237
python -m pip install --upgrade pip
@@ -60,28 +65,29 @@ jobs:
6065
# better cypress run titles
6166
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}}
6267
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}
68+
6369
cypress-run-firefox:
70+
name: Firefox tests (${{ matrix.containers }})
6471
runs-on: ubuntu-latest
6572
strategy:
6673
matrix:
67-
python-version: [3.9]
68-
containers: [1, 2, 3, 4]
74+
containers: [ 1, 2, 3, 4 ]
6975
services:
7076
postgres:
7177
image: postgres:14
7278
env:
7379
POSTGRES_USER: postgres
7480
POSTGRES_PASSWORD: postgres
7581
POSTGRES_DB: csm_web_dev
76-
ports: ["5432:5432"]
82+
ports: [ "5432:5432" ]
7783
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
7884
steps:
7985
- name: Checkout
8086
uses: actions/checkout@v3
81-
- name: Set up Python ${{ matrix.python-version }}
87+
- name: Set up Python ${{ env.PYTHON_VERSION }}
8288
uses: actions/setup-python@v4
8389
with:
84-
python-version: ${{ matrix.python-version }}
90+
python-version: ${{ env.PYTHON_VERSION }}
8591
- name: Install Python dependencies
8692
run: |
8793
python -m pip install --upgrade pip

.github/workflows/django.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,37 @@ on:
66
pull_request:
77
branches: [ master ]
88

9+
env:
10+
PYTHON_VERSION: 3.9
11+
912
jobs:
1013
pytest:
11-
14+
name: "pytest"
1215
runs-on: ubuntu-latest
13-
strategy:
14-
max-parallel: 4
15-
matrix:
16-
python-version: [3.9]
17-
1816
services:
1917
postgres:
2018
image: postgres:14
2119
env:
2220
POSTGRES_USER: postgres
2321
POSTGRES_PASSWORD: postgres
2422
POSTGRES_DB: csm_web_dev
25-
ports: ['5432:5432']
23+
ports: [ "5432:5432" ]
2624
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2725

2826
steps:
29-
- uses: actions/checkout@v2
30-
- name: Set up Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v2
32-
with:
33-
python-version: ${{ matrix.python-version }}
34-
- name: Install Dependencies
35-
run: |
36-
python -m pip install --upgrade pip
37-
pip install -r requirements.txt
38-
- name: Run Tests
39-
env:
40-
SECRET_KEY: ${{ secrets.SECRET_KEY }}
41-
DJANGO_ENV: dev
42-
POSTGRES_PASSWORD: postgres
43-
run: |
44-
pytest csm_web
27+
- uses: actions/checkout@v2
28+
- name: Set up Python ${{ env.PYTHON_VERSION }}
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ env.PYTHON_VERSION }}
32+
- name: Install Dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -r requirements.txt
36+
- name: Run Tests
37+
env:
38+
SECRET_KEY: ${{ secrets.SECRET_KEY }}
39+
DJANGO_ENV: dev
40+
POSTGRES_PASSWORD: postgres
41+
run: |
42+
pytest csm_web

.github/workflows/nodejs.yml

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,39 @@ on:
99
pull_request:
1010
branches: [ master ]
1111

12+
env:
13+
NODE_VERSION: 16.x
14+
1215
jobs:
1316
build:
17+
name: npm build
1418
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
node-version: [16.x]
1819
steps:
19-
- uses: actions/checkout@v2
20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v1
22-
with:
23-
node-version: ${{ matrix.node-version }}
24-
- run: npm ci
25-
- run: npm run build --if-present
26-
- name: Run linters
27-
uses: wearerequired/lint-action@v1
28-
with:
29-
github_token: ${{ secrets.github_token }}
30-
eslint: true
31-
eslint_dir: csm_web/frontend/src
32-
eslint_extensions: js,jsx,ts,tsx
33-
prettier: true
34-
prettier_dir: csm_web/frontend/src
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js ${{ env.NODE_VERSION }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ env.NODE_VERSION }}
25+
- run: npm ci
26+
- run: npm run build --if-present
27+
- name: Run linters
28+
uses: wearerequired/lint-action@v1
29+
with:
30+
github_token: ${{ secrets.github_token }}
31+
eslint: true
32+
eslint_dir: csm_web/frontend/src
33+
eslint_extensions: js,jsx,ts,tsx
34+
prettier: true
35+
prettier_dir: csm_web/frontend/src
3536
test:
37+
name: npm test
3638
runs-on: ubuntu-latest
37-
strategy:
38-
matrix:
39-
node-version: [16.x]
4039
steps:
41-
- uses: actions/checkout@v2
42-
- name: Use Node.js ${{ matrix.node-version }}
43-
uses: actions/setup-node@v1
44-
with:
45-
node-version: ${{ matrix.node-version }}
46-
- run: npm ci
47-
- run: npm run build --if-present
48-
- run: npm run test
40+
- uses: actions/checkout@v2
41+
- name: Use Node.js ${{ env.NODE_VERSION }}
42+
uses: actions/setup-node@v1
43+
with:
44+
node-version: ${{ env.NODE_VERSION }}
45+
- run: npm ci
46+
- run: npm run build --if-present
47+
- run: npm run test

0 commit comments

Comments
 (0)