Skip to content

Update test-bikeability-v2.yml #14

Update test-bikeability-v2.yml

Update test-bikeability-v2.yml #14

name: Lint and Test Bikeability
on:
push:
branches: [ main ]
jobs:
lint-and-test:
name: Lint and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10' ]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up environment bikeability
run: |
python -m venv bikeability
source bikeability/bin/activate
python -m pip install --upgrade pip
pip install -r .github/environments/requirements-bikeability.txt
shell: bash
- name: Set up environment lint
run: |
python -m venv lint-env
source lint-env/bin/activate
python -m pip install --upgrade pip
pip install -r .github/environments/requirements_lint.txt
shell: bash
- name: Run linters
shell: bash -l {0}
run: |
source lint-env/bin/activate
black .
flake8 . --max-line-length=160 --exclude=lint-env/lib/python3.10/site-packages
- name: Install bikeability from TestPyPI
run: |
source bikeability/bin/activate
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple bikeability
shell: bash
- name: Run tests
run: |
source bikeability/bin/activate
pytest tests/
shell: bash