-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (64 loc) · 2.04 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
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
76
77
78
79
name: tests
# This action is triggered:
# 1. when someone creates a pull request (to any branch)
# 2. when changes are merged into the main branch (via a pull request)
on:
push:
branches: [ main ]
pull_request:
branches: [ '*' ]
jobs:
test:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
# we support Linux and macOS
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
# Steps for running tests and analysis.
steps:
- name: Checking out repository (${{ matrix.os }})
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
enable-cache: true
- name: Install Python 3.12
run: uv python install 3.12
- name: Running tests (${{ matrix.os }})
run: uv run --dev coverage run -m unittest discover
env:
DTS_KBASE_DEV_TOKEN: ${{ secrets.DTS_KBASE_DEV_TOKEN }}
# add this when ready
#- if: ${{ matrix.os == 'ubuntu-latest' }}
# name: Uploading coverage report to codecov.io
# uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
publish:
runs-on: ubuntu-latest
# Steps for running tests and analysis.
steps:
- name: Checking out repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
enable-cache: true
- name: Install Python 3.12
run: uv python install 3.12
- name: Build package
run: uv build
- name: Check package can be imported
run: uv run --with dist/dtspy-*-py3-none-any.whl --no-project -- python -c "import dts"
# when ready to upload to PyPI
# name: upload to PyPI
# run: uv publish