Skip to content

Commit 6c8d261

Browse files
authored
Merge pull request #309 from gruebel/update-gha
update GHA workflows and add python version test jobs
2 parents 12f3725 + 596e513 commit 6c8d261

8 files changed

+70
-45
lines changed

.github/workflows/bump-version.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
bump-version:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1111
with:
1212
ref: master
1313

.github/workflows/nodejs-test.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
name: Node.js CI
44

5-
on: [push, pull_request]
5+
on:
6+
push:
7+
branches:
8+
- master
9+
pull_request:
610

711
jobs:
812
build:
@@ -11,14 +15,15 @@ jobs:
1115

1216
strategy:
1317
matrix:
14-
node-version: [12.x, 14.x]
18+
node-version: ['12.x', '14.x', '16.x']
1519

1620
steps:
17-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1822
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v1
23+
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
2024
with:
2125
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
2227
- run: npm install
2328
- run: npm run build --if-present
2429
- run: npm test

.github/workflows/publish.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
test:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1515

16-
- name: Setup Python
17-
uses: actions/setup-python@v1
16+
- name: Setup Python 3.7
17+
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
1818
with:
19-
python-version: 3.7
19+
python-version: '3.7'
2020

2121
- name: Install dependencies
2222
run: |
@@ -26,6 +26,7 @@ jobs:
2626
run: |
2727
make install
2828
29+
# TODO: fix all pylint issues first
2930
# - name: Pylint
3031
# run: |
3132
# make lint
@@ -40,11 +41,11 @@ jobs:
4041
needs: test
4142
runs-on: ubuntu-latest
4243
steps:
43-
- uses: actions/checkout@master
44+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
4445
- name: Set up Python 3.7
45-
uses: actions/setup-python@v1
46+
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
4647
with:
47-
python-version: 3.7
48+
python-version: '3.7'
4849

4950
- name: Install dependencies
5051
run: |
@@ -59,20 +60,19 @@ jobs:
5960
pip install setuptools wheel twine
6061
python -m setup sdist bdist_wheel
6162
- name: Publish package
62-
uses: pypa/gh-action-pypi-publish@master
63+
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10
6364
with:
64-
user: __token__
6565
password: ${{ secrets.PYPI_PASSWORD }}
6666

6767
update-brew:
6868
needs: publish-package
6969
runs-on: ubuntu-latest
7070
steps:
71-
- uses: actions/checkout@master
71+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
7272
- name: Set up Python 3.7
73-
uses: actions/setup-python@v1
73+
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
7474
with:
75-
python-version: 3.7
75+
python-version: '3.7'
7676
- name: publish brew
7777
run: |
7878
sleep 5m
@@ -94,7 +94,7 @@ jobs:
9494
runs-on: ubuntu-latest
9595
needs: update-brew
9696
steps:
97-
- uses: actions/checkout@v2
97+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
9898
with:
9999
ref: master
100100

.github/workflows/python-dependency-updater.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@ on:
99
jobs:
1010
python-dependency-updater:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
python-version: ['3.7']
1512
steps:
16-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1714

1815
- name: Setup Python
19-
uses: actions/setup-python@v2
16+
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
2017
with:
21-
python-version: ${{ matrix.python-version }}
18+
python-version: '3.7'
2219

2320
- name: Run Pyup.io Dependency updater
2421
run: |

.github/workflows/release-drafter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
# Drafts your next Release notes as Pull Requests are merged into "master"
12-
- uses: release-drafter/release-drafter@v5
12+
- uses: release-drafter/release-drafter@65c5fb495d1e69aa8c08a3317bc44ff8aabe9772 # v5.24.0
1313
env:
1414
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/security.yml

+2-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,8 @@ jobs:
1111
detect-secrets:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1515
- name: detect secrets
16-
uses: edplato/trufflehog-actions-scan@master
16+
uses: edplato/trufflehog-actions-scan@c36ff9abf0af8290ef23b1b45a36e75c742dd1d8 # v0.9l-beta
1717
with:
1818
scanArguments: "--regex --entropy=False --exclude_paths .github/exclude-patterns.txt --max_depth=1"
19-
# bandit:
20-
# runs-on: ubuntu-latest
21-
# steps:
22-
# - uses: actions/checkout@v1
23-
# - name: security test
24-
# uses: jpetrucciani/bandit-check@master
25-
# with:
26-
# path: 'cloudsplaining'

.github/workflows/test.yml

+37-5
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,23 @@
22

33
name: Test
44

5-
on: [push, pull_request]
5+
on:
6+
push:
7+
branches:
8+
- master
9+
pull_request:
610

711
jobs:
812
test:
913
runs-on: ubuntu-latest
14+
timeout-minutes: 15
1015
steps:
11-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1217

13-
- name: Setup Python
14-
uses: actions/setup-python@v1
18+
- name: Setup Python 3.7
19+
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
1520
with:
16-
python-version: 3.7
21+
python-version: '3.7'
1722

1823
- name: Install dependencies
1924
run: |
@@ -31,3 +36,30 @@ jobs:
3136
- name: Run mypy (static type check)
3237
run: |
3338
make type-check
39+
40+
python-version:
41+
if: github.event_name == 'pull_request'
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 15
44+
strategy:
45+
fail-fast: true
46+
matrix:
47+
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
48+
steps:
49+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
50+
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
51+
with:
52+
python-version: ${{ matrix.python }}
53+
allow-prereleases: true
54+
55+
- name: Install dependencies
56+
run: |
57+
make setup-dev
58+
59+
- name: Install the package to make sure nothing is randomly broken
60+
run: |
61+
make install
62+
63+
- name: Run pytest (unit tests) and bandit (security test)
64+
run: |
65+
make test

.github/workflows/update-bundle-report.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ jobs:
1010
update:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: checkout
14-
uses: actions/checkout@v2
13+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1514

1615
- name: Setup python
17-
uses: actions/setup-python@v2
16+
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
1817
with:
1918
python-version: '3.7'
2019

@@ -36,8 +35,8 @@ jobs:
3635
make test-js
3736
3837
- name: PR if files were updated
39-
uses: peter-evans/create-pull-request@v3
38+
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
4039
with:
4140
commit-message: Update JS Bundle and example reports
42-
title: 'Updates database'
41+
title: 'Updates JS Bundle and example reports'
4342
body: This is an automated PR created to update the JS Bundle and the example reports.

0 commit comments

Comments
 (0)