Skip to content

migrate circleci to github action #6

migrate circleci to github action

migrate circleci to github action #6

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
python-3-8:
runs-on: ubuntu-latest
env:
PERCY_ENABLE: 0
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python 3.8
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.8'
- name: Set up Chrome
uses: browser-actions/setup-chrome@2e1d749697dd1612b833dba4a722266286fbefcd # v2.1.2
with:
install-chromedriver: true
- name: Cache pip dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-3.8-${{ hashFiles('tests/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-3.8-
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt --quiet
- name: Run tests
run: pytest --headless
python-3-12-install-test:
runs-on: ubuntu-latest
env:
PERCY_ENABLE: 0
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python 3.12
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
- name: Set up Chrome
uses: browser-actions/setup-chrome@2e1d749697dd1612b833dba4a722266286fbefcd # v2.1.2
with:
install-chromedriver: true
- name: Cache pip dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-3.12-${{ hashFiles('tests/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-3.12-
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt --quiet
- name: Generate project and test
run: |
mkdir test_install
cd test_install
cookiecutter .. --config-file ../tests/test_config.yaml --no-input
cd test_component
python -m venv venv
. venv/bin/activate
pip install -r tests/requirements.txt --quiet
npm install --ignore-scripts
npm run build
pytest --headless