Skip to content

Commit

Permalink
Add testing and support for Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Nov 4, 2023
1 parent 62b6018 commit ad90251
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,21 @@ jobs:

- name: Issue scoped Access Token (Python 3.11) (unconstrained)
run: docker compose -f integration/docker-compose.yaml run --no-deps testrun-py311-unconstrained issue-scoped

- name: Import App key (Python 3.12) (constrained)
run: docker compose -f integration/docker-compose.yaml run --no-deps testrun-py312-constrained import

- name: Issue Access Token (Python 3.12) (constrained)
run: docker compose -f integration/docker-compose.yaml run --no-deps testrun-py312-constrained issue

- name: Issue scoped Access Token (Python 3.12) (constrained)
run: docker compose -f integration/docker-compose.yaml run --no-deps testrun-py312-constrained issue-scoped

- name: Import App key (Python 3.12) (unconstrained)
run: docker compose -f integration/docker-compose.yaml run --no-deps testrun-py312-unconstrained import

- name: Issue Access Token (Python 3.12) (unconstrained)
run: docker compose -f integration/docker-compose.yaml run --no-deps testrun-py312-unconstrained issue

- name: Issue scoped Access Token (Python 3.12) (unconstrained)
run: docker compose -f integration/docker-compose.yaml run --no-deps testrun-py312-unconstrained issue-scoped
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

strategy:
matrix:
py_version: ["3.10", "3.11"]
py_version: ["3.10", "3.11", "3.12"]
dependencies: ["constrained", "unconstrained"]

steps:
Expand Down
43 changes: 43 additions & 0 deletions integration/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,49 @@ services:
depends_on:
- vault-setup

testrun-py312-constrained:
cap_drop:
- ALL
security_opt:
- no-new-privileges
read_only: true
user: 3120:3120
build:
args:
pyver: "3.12"
pip_extra: --constraint=/src/constraints.txt
context: ..
dockerfile: integration/Dockerfile
environment:
HV4GHA_KEYNAME: test-312-constrained
HV4GHA_VAULT_ADDR: http://vault-server:8200
HV4GHA_VAULT_TOKEN: BatteryStaple
env_file: .env
command: [import, issue, issue-scoped]
depends_on:
- vault-setup

testrun-py312-unconstrained:
cap_drop:
- ALL
security_opt:
- no-new-privileges
read_only: true
user: 3120:3120
build:
args:
pyver: "3.12"
context: ..
dockerfile: integration/Dockerfile
environment:
HV4GHA_KEYNAME: test-312-unconstrained
HV4GHA_VAULT_ADDR: http://vault-server:8200
HV4GHA_VAULT_TOKEN: BatteryStaple
env_file: .env
command: [import, issue, issue-scoped]
depends_on:
- vault-setup

vault-setup:
image: hashicorp/vault
environment:
Expand Down
7 changes: 4 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tool.poetry]
name = "hv4gha"
version = "0.2.2"
version = "0.2.3"
description = "Use HashiCorp Vault to manage a GitHub App's private RSA key."
authors = ["Andreas Olsson <[email protected]>"]
repository = "https://github.com/andreaso/hv4gha"
license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.10, <3.12"
python = ">=3.10, <3.13"
cryptography = ">=41.0.4"
requests = "^2.31.0"
pydantic = "^2.1.1"
Expand Down

0 comments on commit ad90251

Please sign in to comment.