-
Notifications
You must be signed in to change notification settings - Fork 28
49 lines (47 loc) · 1.27 KB
/
tests.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
name: AliPCS-Py Build & Test
on:
push:
branches:
- master
pull_request:
branches:
- master
- release/*
jobs:
build-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ["3.8", "3.12"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
- name: Install dependencies
run: |
poetry run pip3 install setuptools
poetry install --no-root
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Format check
run: poetry run ruff format --check .
- name: Typecheck
run: poetry run ruff check alipcs_py
- name: Test with pytest
run: |
poetry run python build.py build_ext --inplace
poetry run pytest -v -s
- name: Test package
run: |
poetry build -f sdist
poetry run pip install dist/*