Skip to content

Commit 8bcc345

Browse files
authored
Merge pull request #32 from aserto-dev/dependabot/pip/aiohttp-3.10.11
Bump aiohttp from 3.10.10 to 3.10.11
2 parents cac63d3 + 412b10e commit 8bcc345

File tree

7 files changed

+172
-458
lines changed

7 files changed

+172
-458
lines changed

.github/workflows/ci.yaml

Lines changed: 78 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: ci
23

34
on:
@@ -15,133 +16,117 @@ on:
1516

1617
env:
1718
VAULT_ADDR: https://vault.eng.aserto.com/
18-
GO_VERSION: "1.22"
19+
PYTHON_VERSION: "3.9"
20+
POETRY_VERSION: "1.8.3"
21+
TOPAZ_VERSION: "0.32.38"
1922

2023
jobs:
2124
test:
2225
name: Run test
2326
runs-on: ubuntu-latest
2427
steps:
25-
- name: Read Configuration
26-
uses: hashicorp/vault-action@v3
27-
id: vault
28-
with:
29-
url: ${{ env.VAULT_ADDR }}
30-
token: ${{ secrets.VAULT_TOKEN }}
31-
secrets: |
32-
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY;
33-
34-
- name: Setup git
35-
run: |
36-
mkdir -p $HOME/.ssh
37-
umask 0077 && echo -e "${SSH_PRIVATE_KEY}" > $HOME/.ssh/id_rsa
38-
ssh-keyscan github.com >> $HOME/.ssh/known_hosts
39-
git config --global url."git@github.com:".insteadOf https://github.com/
40-
41-
- name: Checkout Repo
28+
-
29+
name: Checkout Repo
4230
uses: actions/checkout@v4
43-
44-
- name: Set up Homebrew
45-
uses: Homebrew/actions/setup-homebrew@master
46-
47-
- name: Install topaz
48-
run: brew tap aserto-dev/tap && brew install aserto-dev/tap/topaz && topaz install
49-
50-
- name: Use python 3.9
31+
-
32+
name: Install topaz CLI
33+
env:
34+
GH_TOKEN: ${{ github.token }}
35+
run: |
36+
gh release download v${{ env.TOPAZ_VERSION }} --repo aserto-dev/topaz --pattern "topaz_linux_x86_64.zip" \
37+
--output ./ext/topaz.zip --clobber
38+
unzip ./ext/topaz.zip -d bin
39+
chmod +x ./bin/topaz
40+
./bin/topaz version
41+
echo "TOPAZ=$(realpath ./bin/topaz)" >> "$GITHUB_ENV"
42+
echo "TOPAZ_CERTS_DIR=$(./bin/topaz config info | jq '.config.topaz_certs_dir' -r)" >> "$GITHUB_ENV"
43+
echo "PATH=$PATH:$(realpath ./bin)" >> "$GITHUB_ENV"
44+
-
45+
name: Install topazd container
46+
run: |
47+
topaz install --container-tag=${{ env.TOPAZ_VERSION }}
48+
topaz version
49+
-
50+
name: Generate topaz certs
51+
run: topaz certs generate
52+
-
53+
name: Setup python
5154
uses: actions/setup-python@v5
5255
with:
53-
python-version: '3.12'
54-
55-
- name: Install and configure Poetry
56+
python-version: ${{ env.PYTHON_VERSION }}
57+
-
58+
name: Install and configure Poetry
5659
uses: snok/install-poetry@v1
5760
with:
58-
version: 1.8.3
61+
version: ${{ env.POETRY_VERSION }}
62+
-
63+
name: Install dependencies
64+
run: poetry install
65+
-
66+
name: Lint
67+
run: poetry run pyright .
68+
-
69+
name: Test
70+
run: poetry run pytest -vv
5971

60-
- name: Run lint
61-
run: |
62-
poetry install
63-
poetry run pyright .
64-
65-
- name: Run tests
66-
run: |
67-
poetry run pytest -vv
6872
release:
6973
runs-on: ubuntu-latest
7074
needs: test
7175
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
7276

7377
name: Release to pypi
7478
steps:
75-
- name: Read Configuration
79+
-
80+
uses: actions/create-github-app-token@v1
81+
id: app-token
82+
with:
83+
app-id: ${{ vars.CODEGEN_APP_ID }}
84+
private-key: ${{ secrets.CODEGEN_APP_KEY }}
85+
-
86+
name: Checkout
87+
uses: actions/checkout@v4
88+
with:
89+
fetch-depth: 0
90+
token: ${{ steps.app-token.outputs.token }}
91+
-
92+
name: Read Configuration
7693
uses: hashicorp/vault-action@v3
7794
id: vault
7895
with:
7996
url: ${{ env.VAULT_ADDR }}
8097
token: ${{ secrets.VAULT_TOKEN }}
8198
secrets: |
82-
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY;
8399
kv/data/pypi "API_TOKEN" | POETRY_HTTP_BASIC_PYPI_PASSWORD;
84-
85-
- name: Checkout
86-
uses: actions/checkout@v4
87-
with:
88-
fetch-depth: 0
89-
90-
- name: Setup Go
91-
uses: actions/setup-go@v5
92-
with:
93-
go-version: ${{ env.GO_VERSION }}
94-
95-
- name: Setup caching
96-
uses: actions/cache@v4
97-
with:
98-
path: |
99-
~/.cache/go-build
100-
~/go/pkg/mod
101-
.ext
102-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum', 'Depfile') }}
103-
restore-keys: |
104-
${{ runner.os }}-go-
105-
106-
- name: Install dependencies
107-
run: |
108-
mkdir -p $HOME/.ssh
109-
umask 0077 && echo -e "${SSH_PRIVATE_KEY}" > $HOME/.ssh/id_rsa
110-
ssh-keyscan github.com >> $HOME/.ssh/known_hosts
111-
112-
git config --global url."git@github.com:".insteadOf https://github.com/
113-
git config --global user.email "github-bot@aserto.com"
114-
git config --global user.name "Aserto Bot"
115-
116-
eval `ssh-agent`
117-
ssh-add $HOME/.ssh/id_rsa
118-
119-
go run mage.go deps
120-
121-
- name: Set up Python
100+
-
101+
name: Set up Python
122102
uses: actions/setup-python@v5
123103
with:
124-
python-version: '3.12'
125-
126-
- name: Install Poetry
104+
python-version: ${{ env.PYTHON_VERSION }}
105+
-
106+
name: Install Poetry
127107
uses: snok/install-poetry@v1
128108
with:
129-
version: 1.8.3
130-
131-
- name: Build and push the python package
109+
version: ${{ env.POETRY_VERSION }}
110+
-
111+
name: Build
112+
run: poetry build
113+
-
114+
name: Publish
132115
env:
133116
# When using a PYPI API token, the user name must be set to "__token__"
134117
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
135-
run: go run mage.go release
136-
137-
- name: Bump to the next version
138-
run: go run mage.go bump patch
139-
140-
- name: Commit changes
118+
run: |
119+
poetry publish
120+
-
121+
name: Bump version
122+
id: bump
123+
uses: callowayproject/bump-my-version@master
124+
with:
125+
args: patch
126+
-
127+
name: Commit changes
141128
uses: EndBug/add-and-commit@v9
142129
with:
143130
default_author: github_actions
144-
message: 'Bump to next version'
131+
message: 'Bump version: ${{ steps.bump.outputs.current-version }}'
145132
add: 'pyproject.toml'
146-
push: origin HEAD:main
147-

Depfile

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

mage.go

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

magefiles/go.mod

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

0 commit comments

Comments
 (0)