Skip to content

MAINT infrastructure for integration tests #15

MAINT infrastructure for integration tests

MAINT infrastructure for integration tests #15

# 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