-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (48 loc) · 1.47 KB
/
build.yml
File metadata and controls
60 lines (48 loc) · 1.47 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
name: Build and test
on:
# Run on demand
workflow_dispatch:
# Run pull requests against the default branch
pull_request:
branches: [master]
# Run on push to default branch
push:
branches: [master]
concurrency:
group: build-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest", "windows-latest"]
steps:
- name: Clone this git repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements/*.txt
- name: Install Python requirements
run: python -m pip install -r requirements/test.txt
- name: Build package
run: python -m build
- name: Install package
run: python -m pip install ./dist/satsuki-*.whl
shell: bash
- name: Run python tests
run: pytest tests/
- name: Upload distributions
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: dists
path: dist/
if-no-files-found: error
retention-days: 1