Skip to content

Use Github Actions rather than Circle for automated tests #2

Use Github Actions rather than Circle for automated tests

Use Github Actions rather than Circle for automated tests #2

Workflow file for this run

name: CI Pipeline
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, 3.10, 3.11, 3.12]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Chrome
uses: browser-actions/[email protected]
- name: Install ChromeDriver
uses: browser-actions/[email protected]
- name: Install dependencies
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install wheel
pip install ".[dev]"
- name: Build package
run: |
. venv/bin/activate
npm ci
npm run build
timeout-minutes: 20
- name: Lint
run: npm run lint
- name: Run tests
run: |
. venv/bin/activate
pytest --headless
test-react:
runs-on: ubuntu-latest
strategy:
matrix:
react-version: ["16.8.0", "17.0.0", "18.2.0"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.12
- uses: browser-actions/[email protected]
- uses: browser-actions/[email protected]
- run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install wheel
pip install ".[dev]"
echo "Using React version ${{ matrix.react-version }}"
npm ci
npm install react@${{ matrix.react-version }} react-dom@${{ matrix.react-version }}
npm run build
timeout-minutes: 20
- run: npm run lint
- run: |
. venv/bin/activate
pytest --headless