Skip to content

Commit

Permalink
matrix-ized ci worflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Jul 1, 2024
1 parent 21851da commit 852e7aa
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 6 deletions.
131 changes: 126 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,141 @@ on:
# Using the strategy/matrix mechanism as is done in other repos causes the tests to run
# concurrently. TODO: Find a way to do this without having to clone these sections.
jobs:
build:
build_3_8:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
strategy:
matrix:
python_version: [3.8, 3.11]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
python-version: '3.8'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Deps
run: |
make install
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: QA (unit)
run: |
poetry run invoke test --no-flake
build_3_9:
needs: build_3_8
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Deps
run: |
make install
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: QA (unit)
run: |
poetry run invoke test --no-flake
build_3_10:
needs: build_3_9
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Deps
run: |
make install
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: QA (unit)
run: |
poetry run invoke test --no-flake
build_3_11:
needs: build_3_10
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Deps
run: |
make install
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: QA (unit)
run: |
poetry run invoke test --no-flake
build_3_12:
needs: build_3_10
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@v1
Expand Down
1 change: 0 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Change Log
=====

* Support for Python 3.12.
* Matrix-ized GitHub Action CI workflow (.github/workflows/main.yml).


5.2.2
Expand Down

0 comments on commit 852e7aa

Please sign in to comment.