Skip to content
4 changes: 2 additions & 2 deletions .github/workflows/ci_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

jobs:
test:
runs-on: ubuntu-latest
runs-on: &codebuild-linux codebuild-CryptoToolsCI-linux-aws-dynamodb-encryption-python-${{ github.run_id }}-${{ github.run_attempt }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -65,22 +65,22 @@
run: tox

coverage:
runs-on: ubuntu-latest
runs-on: *codebuild-linux
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "tox < 4.0"
pip install setuptools

- name: Run coverage
env:
TOXENV: coverage
run: tox

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 1 addition & 1 deletion .github/workflows/ci_static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
analysis:
runs-on: ubuntu-latest
runs-on: codebuild-CryptoToolsCI-linux-aws-dynamodb-encryption-python-${{ github.run_id }}-${{ github.run_attempt }}
strategy:
fail-fast: false
matrix:
Expand Down
34 changes: 19 additions & 15 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@ name: tests

on:
workflow_call:
# Keep the schedule to maintain daily runs
schedule:
- cron: '0 0 * * *'
inputs:
platforms:
type: string
required: false
default: >-
[{"os": "ubuntu-latest", "architecture": "x64", "runner": "codebuild-CryptoToolsCI-linux-aws-dynamodb-encryption-python-${{ github.run_id }}-${{ github.run_attempt }}"},
{"os": "windows-latest", "architecture": "x64", "runner": "windows-latest"},
{"os": "macos-latest", "architecture": "x64", "runner": "macos-latest"}]
upstream:
type: boolean
required: false
default: true

permissions:
contents: read

jobs:
tests:
runs-on: ${{ matrix.platform.os }}
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: true
matrix:
platform:
- os: ubuntu-latest
architecture: x64
- os: windows-latest
architecture: x64
# x86 builds are only meaningful for Windows
- os: windows-latest
architecture: x86
- os: macos-latest
architecture: x64
platform: ${{ fromJSON(inputs.platforms) }}
python:
- 3.8
- 3.9
Expand Down Expand Up @@ -63,10 +63,13 @@ jobs:
- name: run test
env:
TOXENV: ${{ matrix.category }}
# On Windows, pip writes its output in the console code page, but tox reads it as UTF-8.
PYTHONUTF8: "1"
run: tox -- -vv

upstream-py311:
runs-on: ubuntu-latest
if: inputs.upstream != false
runs-on: codebuild-CryptoToolsCI-linux-aws-dynamodb-encryption-python-${{ github.run_id }}-${{ github.run_attempt }}
strategy:
fail-fast: true
matrix:
Expand All @@ -85,4 +88,5 @@ jobs:
- name: run test
env:
TOXENV: ${{ matrix.category }}
PYTHONUTF8: "1"
run: tox -- -vv
14 changes: 14 additions & 0 deletions .github/workflows/daily_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Daily CI

on:
# Keep the schedule to maintain daily runs
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
call-tests:
name: Run Tests
uses: ./.github/workflows/ci_tests.yaml
13 changes: 12 additions & 1 deletion .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,24 @@ jobs:
call-tests:
name: Run Tests
uses: ./.github/workflows/ci_tests.yaml
with:
platforms: >-
[{"os": "ubuntu-latest", "architecture": "x64", "runner": "codebuild-CryptoToolsCI-linux-aws-dynamodb-encryption-python-${{ github.run_id }}-${{ github.run_attempt }}"}]
call-tests-macos-windows:
name: Run Tests (macOS, Windows)
uses: ./.github/workflows/ci_tests.yaml
with:
platforms: >-
[{"os": "windows-latest", "architecture": "x64", "runner": "windows-latest"},
{"os": "macos-latest", "architecture": "x64", "runner": "macos-latest"}]
upstream: false
pr-ci-all-required:
if: always()
needs:
- call-integration-tests
- call-static-analysis
- call-tests
runs-on: ubuntu-22.04
runs-on: codebuild-CryptoToolsCI-linux-aws-dynamodb-encryption-python-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: Verify all required jobs passed
uses: re-actors/alls-green@release/v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
repo-sync:
name: Repo Sync
environment: repo-sync
runs-on: ubuntu-latest
runs-on: codebuild-CryptoToolsCI-linux-aws-dynamodb-encryption-python-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v4
- uses: repo-sync/github-sync@v2
Expand Down
Loading