Skip to content

Commit efb1527

Browse files
authored
feat: add multiarch images and modernize the pipelines (#90)
1 parent 71c942b commit efb1527

25 files changed

Lines changed: 467 additions & 410 deletions

.github/workflows/ci.yml

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ on:
1414
env:
1515
python_version: "3.11"
1616

17+
defaults:
18+
run:
19+
shell: 'bash --noprofile --norc -Eeuo pipefail {0}'
20+
1721
jobs:
1822
lint:
1923
name: Lint
20-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-22.04
2125
steps:
2226
- name: Checkout the repository
2327
uses: actions/checkout@v3
@@ -29,7 +33,7 @@ jobs:
2933
disable_mypy: true
3034
test:
3135
name: Test
32-
runs-on: ubuntu-20.04
36+
runs-on: ubuntu-22.04
3337
steps:
3438
- name: Checkout the repository
3539
uses: actions/checkout@v3
@@ -62,6 +66,59 @@ jobs:
6266
- name: Install Task
6367
uses: arduino/setup-task@v1
6468
- name: Initialize the repo
65-
run: task init
69+
run: task -v init
70+
- name: Validate the repo
71+
run: task -v validate
72+
- name: Set up QEMU for cross-platform emulation
73+
uses: docker/setup-qemu-action@v2
6674
- name: Run the tests
67-
run: task test
75+
run: task -v test
76+
bump-version:
77+
name: Bump version
78+
needs: [lint, test]
79+
if: "${{ github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'Bump version: 2') }}"
80+
permissions:
81+
contents: write
82+
runs-on: ubuntu-22.04
83+
outputs:
84+
tag: ${{ steps.bump-version.outputs.tag }}
85+
steps:
86+
- name: Checkout the repository
87+
uses: actions/checkout@v3
88+
with:
89+
token: ${{ secrets.SEISO_AUTOMATION_PAT }}
90+
fetch-depth: 0
91+
- name: Setup python
92+
uses: actions/setup-python@v4
93+
with:
94+
python-version: ${{ env.python_version }}
95+
- uses: actions/cache@v3
96+
with:
97+
path: ~/.local/share/virtualenvs
98+
key: ${{ runner.os }}-python-${{ env.python_version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
99+
restore-keys: |
100+
${{ runner.os }}-python-${{ env.python_version }}-pipenv-
101+
${{ runner.os }}-python-
102+
- name: Install the dependencies
103+
run: python -m pip install --upgrade pipenv
104+
- name: Install Task
105+
uses: arduino/setup-task@v1
106+
- name: Initialize the repo
107+
run: task -v init
108+
- name: Bump the version
109+
id: bump-version
110+
run: |
111+
task -v release
112+
TAG="$(git describe --tags)"
113+
BRANCH="$(git branch --show-current)"
114+
git push --atomic origin "${BRANCH}" "${TAG}"
115+
echo "tag=${TAG}" >> "${GITHUB_OUTPUT}"
116+
- name: Publish the release to GitHub
117+
uses: softprops/action-gh-release@v1
118+
env:
119+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120+
with:
121+
name: ${{ steps.bump-version.outputs.tag }}
122+
tag_name: ${{ steps.bump-version.outputs.tag }}
123+
draft: false
124+
prerelease: false

.github/workflows/release.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/security.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
env:
88
python_version: "3.11"
99

10+
defaults:
11+
run:
12+
shell: 'bash --noprofile --norc -Eeuo pipefail {0}'
13+
1014
jobs:
1115
analyze:
1216
name: CodeQL
@@ -28,8 +32,11 @@ jobs:
2832
- name: Install the dependencies
2933
run: |
3034
python -m pip install --upgrade pipenv
31-
pipenv install --python ${{ env.python_version }} --deploy --ignore-pipfile --dev
3235
echo "CODEQL_PYTHON=$(pipenv run which python)" >> "${GITHUB_ENV}"
36+
- name: Install Task
37+
uses: arduino/setup-task@v1
38+
- name: Initialize the repo
39+
run: task -v init
3340
- name: Initialize CodeQL
3441
uses: github/codeql-action/init@v2
3542
with:

.github/workflows/update.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ on:
99
env:
1010
python_version: "3.11"
1111

12+
defaults:
13+
run:
14+
shell: 'bash --noprofile --norc -Eeuo pipefail {0}'
15+
1216
jobs:
1317
update:
1418
name: Update
15-
runs-on: ubuntu-20.04
19+
runs-on: ubuntu-22.04
1620
permissions:
1721
contents: write
1822
pull-requests: write
@@ -30,13 +34,13 @@ jobs:
3034
${{ runner.os }}-python-${{ env.python_version }}-pipenv-
3135
${{ runner.os }}-python-
3236
- name: Install the dependencies
33-
run: |
34-
python -m pip install --upgrade pipenv
35-
pipenv install --deploy --ignore-pipfile --dev
37+
run: python -m pip install --upgrade pipenv
3638
- name: Install Task
3739
uses: arduino/setup-task@v1
40+
- name: Initialize the repo
41+
run: task -v init
3842
- name: Update the repository
39-
run: task update
43+
run: task -v update
4044
- name: Create or update a pull request
4145
uses: peter-evans/create-pull-request@v4
4246
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
repos:
33
- repo: https://github.com/seisollc/goat
4-
rev: 1182cb0e3c396e21a4fe887191295a11e129724e # frozen: latest
4+
rev: 593455973b31d1e57474e10ee009668811d68602
55
hooks:
66
- id: seiso-lint

Pipfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ name = "pypi"
66
[packages]
77

88
[dev-packages]
9-
black = "*"
109
bumpversion = "*"
1110
coverage = "*"
12-
docker = "*"
13-
flake8 = "*"
1411
gitpython = "*"
15-
mypy = "*"
1612
pre-commit = "*"
17-
pylint = "*"
1813
pytest = "*"
1914
pytest-cookies = "*"
2015
pytest-cov = "*"

0 commit comments

Comments
 (0)