-
Notifications
You must be signed in to change notification settings - Fork 20
62 lines (59 loc) · 1.68 KB
/
test-publish.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
name: Test publish (testpypi)
on:
workflow_dispatch:
inputs:
dbt_artifacts_parser_version:
description: "dbt-artifacts-parser version"
required: true
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install uv
run: |
pip install -r requirements.setup.txt
- name: Test publish
env:
UV_PUBLISH_TOKEN: "${{ secrets.TESTPYPI_API_TOKEN }}"
run: |
bash dev/publish.sh testpypi
test-published-package:
needs:
- publish
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12" ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Install packages
run: |
python3 -m pip install -U pip==23.1.0
python3 -m pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
--force-reinstall \
--use-feature=fast-deps \
-U dbt-artifacts-parser=="${{ github.event.inputs.dbt_artifacts_parser_version }}"
# It takes some time when the package gets available.
- name: Sleep
run: |
sleep 30
- name: Test package
run: |
python -c 'import dbt_artifacts_parser; print(dbt_artifacts_parser.__version__)'