kopia lustrzana https://github.com/jedie/PyInventory
51 wiersze
1.1 KiB
YAML
51 wiersze
1.1 KiB
YAML
# https://github.com/actions/setup-python
|
|
|
|
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
schedule:
|
|
- cron: '0 8 * * *'
|
|
|
|
jobs:
|
|
test:
|
|
name: 'Python ${{ matrix.python-version }} on ${{ matrix.os }}'
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
PYTHONUNBUFFERED: 1
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: [3.9, 3.8, 3.7]
|
|
os: [ubuntu-latest] # TODO: macOS-latest, windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: 'fetch main'
|
|
run: |
|
|
git fetch origin main
|
|
- name: 'Set up Python ${{ matrix.python-version }}'
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '${{ matrix.python-version }}'
|
|
|
|
- name: 'Bootstrap'
|
|
run: |
|
|
python3 devshell.py quit
|
|
|
|
- name: 'List installed packages'
|
|
run: |
|
|
python3 devshell.py list_venv_packages
|
|
|
|
- name: 'Run tests with Python v${{ matrix.python-version }}'
|
|
run: |
|
|
python3 devshell.py pytest -vv
|
|
|
|
- name: 'Upload coverage report'
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: bash <(curl -s https://codecov.io/bash)
|