-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.38 KB
/
test-bikeability.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Test Bikeability on Ubuntu
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
include:
- environment-file: .github/environments/requirements-bikeability.txt
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m venv bikeability
source bikeability/bin/activate
python -m pip install --upgrade pip
pip install -r ${{ matrix.environment-file }}
shell: bash
- 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