Skip to content

🐛 Fix rulesets path in run_demo, remove unused workflows #611

🐛 Fix rulesets path in run_demo, remove unused workflows

🐛 Fix rulesets path in run_demo, remove unused workflows #611

name: Test Code on PR
on: [pull_request]
jobs:
test-code-on-pr:
name: Test Code on PR Runner
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]
python-version: ["3.12"]
# Github actions only supports x64 architecture for now, arm64 is in a
# private beta.
architecture: ["x64"]
# Exclude no combinations for now
# exclude: []
env:
COVERAGE_REPORT_DIR: coverage-report-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.architecture }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel pip-tools
pip install -e .[dev]
- name: Set up prerequisites
run: |
cd example
./fetch.sh
cd ..
git config --global user.email "tester@example.com"
git config --global user.name "Tester"
- name: Test with unittest and generate coverage report
run: ./run_tests.sh
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: ${{ env.COVERAGE_REPORT_DIR }}
path: ${{ env.COVERAGE_REPORT_DIR }}
if: ${{ always() }}