Skip to content

CI

CI #746

Workflow file for this run

name: CI
on:
push:
pull_request_target:
schedule:
- cron: '00 12 * * 5'
permissions:
contents: read
id-token: write
jobs:
setup:
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && github.actor != 'dependabot[bot]') ||
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') ||
(github.event_name == 'schedule')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- uses: ./.github/workflows/composite/setup-stairlight
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_WORKLOAD_IDP: ${{ secrets.GCP_WORKLOAD_IDP }}
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Check linting
run: |
make lint
- name: Setup test objects
run: |
make setup-test
test:
runs-on: ubuntu-latest
needs: setup
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: ./.github/workflows/composite/setup-stairlight
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_WORKLOAD_IDP: ${{ secrets.GCP_WORKLOAD_IDP }}
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Type check
run: |
make type-check
- name: Unit test
run: |
make test