Skip to content

.github/workflows/ci.yml #195

.github/workflows/ci.yml

.github/workflows/ci.yml #195

Workflow file for this run

on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
schedule:
- cron: '0 14 * * 1' # Runs at 2 PM UTC every Monday
jobs:
ci:
strategy:
fail-fast: false
matrix:
task: [test, lint, format, private-test]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Patcherex2
uses: ./.github/actions/install-patcherex2
- name: Install Packages
run: python3 -m pip install --upgrade pytest ruff
- name: Run pytest
if: matrix.task == 'test'
run: python3 -m pytest
- name: Run formatter
if: matrix.task == 'format'
run: python3 -m ruff format . --check
- name: Run linter
if: matrix.task == 'lint'
run: python3 -m ruff check .
- name: Checkout Private Tests
if: matrix.task == 'private-test' && github.event_name != 'pull_request'
uses: actions/checkout@v4
with:
repository: purseclab/patcherex2-private
ssh-key: ${{ secrets.PRIVATE_TESTS_DEPLOY_KEY }}
path: private
- name: Run pytest for Private Tests
if: matrix.task == 'private-test' && github.event_name != 'pull_request'
working-directory: ./private
run: python3 -m pytest -q --no-summary