-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (64 loc) · 2.25 KB
/
python-package.yml
File metadata and controls
75 lines (64 loc) · 2.25 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Build Package 📦
on:
push:
branches: ["main"]
jobs:
build:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] # [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"] # ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # caching pip dependencies
cache-dependency-path: "**/requirements/dev.txt"
- name: Install dependencies 📥
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Lint with ruff @chartboost 🧹
uses: chartboost/ruff-action@v1
continue-on-error: true
- name: Install pytest-action dependencies 📥
run: |
pip install pytest-md
pip install pytest-emoji
- name: Run pytest @pavelzw 🧪
uses: pavelzw/pytest-action@v2
with:
custom-arguments: "tests -rA --doctest-modules --cov=."
continue-on-error: true
- name: Upload coverage to Codecov 📊
uses: codecov/codecov-action@v4
with:
# file: .coverage
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Pylance type checking @jakebailey ✅
uses: jakebailey/pyright-action@v2
with:
pylance-version: latest-release
stats: true
# verbose: true
continue-on-error: true
- name: Install public interface package 📥
run: |
python -m pip install .
- name: Verify public API types with Pylance @jakebailey ✅
uses: jakebailey/pyright-action@v2
with:
pylance-version: latest-release
verify-types: rl_thor
# verbose: true
continue-on-error: true