-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (41 loc) · 1.29 KB
/
pythonpackage.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
# mash-up of matrix and pipenv examples from <https://github.com/actions/setup-python#usage>
name: Test
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened] # default events
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false # prevent one broken version from stopping all other runs
matrix:
# these will be out of date again eventually, add the latest versions
# and remove the unsupported ones
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pipenv'
- name: Install dependencies
run: pipenv install --dev
- name: Lint with flake8
run: pipenv run flake8 *.py
continue-on-error: true
- name: Typecheck with mypy
run: pipenv run mypy *.py
- name: Test with unittest
run: pipenv run python -m unittest discover -v
- name: Install as package with pip
run: pip install .
- name: Run installed version
run: |
focstest --version