MAINT infrastructure for integration tests #15
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builds the pyrit environment and runs integration tests | |
name: integration_tests | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
- "release/**" | |
workflow_dispatch: | |
schedule: | |
# daily at midnight (Pacific Time) in UTC | |
- cron: "0 8 * * *" | |
concurrency: | |
# This ensures after each commit the old jobs are cancelled and the new ones | |
# run instead. | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
main-job: | |
environment: integration-tests | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python: ["3.10", "3.11", "3.12"] | |
package_name: ["pyrit"] | |
package_extras: ["all"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create environment file with access keys | |
# The .env file has to be base64 encoded to accommodate line breaks. | |
run: | | |
echo "${{ env.ENV_SECRETS }}" | base64 -d > .env | |
env: | |
ENV_SECRETS: ${{ secrets.TEST_ENV }} | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install setuptools and pip | |
run: pip install --upgrade setuptools pip | |
- name: Install PyRIT with pip | |
run: pip install .[${{ matrix.package_extras }}] | |
- name: Run integration tests | |
run: make integration-test |