Skip to content

Merge pull request #772 from eskerda/fix-velomagg #839

Merge pull request #772 from eskerda/fix-velomagg

Merge pull request #772 from eskerda/fix-velomagg #839

Workflow file for this run

name: pybikes
env:
PYBIKES_CYCLOCITY: ${{ secrets.PYBIKES_CYCLOCITY }}
PYBIKES_BYSYKKEL: ${{ secrets.PYBIKES_BYSYKKEL }}
PYBIKES_WEELO_CLIENT_ID: ${{ secrets.PYBIKES_WEELO_CLIENT_ID }}
PYBIKES_WEELO_CLIENT_SECRET: ${{ secrets.PYBIKES_WEELO_CLIENT_SECRET }}
PYBIKES_DEUTSCHEBAHN_CLIENT_ID: ${{ secrets.PYBIKES_DEUTSCHEBAHN_CLIENT_ID }}
PYBIKES_DEUTSCHEBAHN_CLIENT_SECRET: ${{ secrets.PYBIKES_DEUTSCHEBAHN_CLIENT_SECRET }}
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
unit:
name: Unit tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: make install
- name: lint
run: make lint
- name: test
run: make test
instance-changes:
name: Instance tests (only changes)
runs-on: ubuntu-latest
needs: [unit]
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: make install
- name: Test instance changes on this branch
run: make test-changes T_FLAGS+='-n 10 --json-report --json-report-file=report/report.json'
# Only run summary once
- name: all summary
if: (success() || failure())
run: |
make github-summary >> $GITHUB_STEP_SUMMARY
instance-tests:
name: Instance tests (all)
runs-on: ubuntu-latest
needs: [unit]
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: make install
- name: Test all instances
run: |
make report! T_FLAGS+='-n 10' || true
# Only run summary once
- name: summary
if: (success() || failure())
run: |
make github-summary >> $GITHUB_STEP_SUMMARY
# This is more like a watchdog to know if the library still works with
# python 2 or not. Not that it really matters
python2:
name: Unit tests (2.7)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 2.7
uses: MatteoH2O1999/setup-python@v4
with:
python-version: '2.7'
allow-build: info
cache-build: true
- name: Install dependencies
run: make install
- name: lint
run: make lint
- name: test
run: make test