Skip to content

ENH: Only test on Py3.10 for version branches #99

ENH: Only test on Py3.10 for version branches

ENH: Only test on Py3.10 for version branches #99

name: Version Branch CI/CD
on:
pull_request:
branches: ["v*"]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.10
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files
pytest:
runs-on: ubuntu-latest
container:
image: python:3.10-slim
env:
NODE_VERSION: 20
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: 3.10
- name: Create virtual environment
run: python -m venv venv
- name: Activate virtual environment
run: |
. venv/bin/activate
- name: Install dependencies
run: |
venv/bin/python -m pip install --upgrade pip
venv/bin/python -m pip install pytest
venv/bin/python -m pip install -r requirements-dev.lock
venv/bin/python -m pip install pytest-cov coverage
- name: Test with pytest
run: |
venv/bin/python -m pytest --cov=epochalyst --cov-branch --cov-fail-under=95 tests
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.10
- run: |
pip install build
python -m build
- uses: actions/upload-artifact@v3
with:
path: ./dist