|
7 | 7 | description: "dbt-artifacts-parser version"
|
8 | 8 | required: true
|
9 | 9 |
|
10 |
| - |
11 | 10 | jobs:
|
12 | 11 | publish:
|
13 | 12 | runs-on: ubuntu-latest
|
14 | 13 | defaults:
|
15 | 14 | run:
|
16 | 15 | shell: bash
|
17 | 16 | steps:
|
18 |
| - - name: Dump GitHub context |
19 |
| - env: |
20 |
| - GITHUB_CONTEXT: ${{ toJson(github) }} |
21 |
| - run: echo "$GITHUB_CONTEXT" |
22 | 17 | - uses: actions/checkout@v4
|
23 | 18 | - name: Set up Python
|
24 | 19 | uses: actions/setup-python@v5
|
25 | 20 | with:
|
26 | 21 | python-version: "3.9"
|
27 |
| - - uses: actions/cache@v4 |
28 |
| - id: cache |
29 |
| - with: |
30 |
| - path: ${{ env.pythonLocation }} |
31 |
| - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish |
32 |
| - - name: Install Flit |
33 |
| - if: steps.cache.outputs.cache-hit != 'true' |
34 |
| - run: bash dev/setup.sh |
| 22 | + - name: Install uv |
| 23 | + run: | |
| 24 | + pip install -r requirements.setup.txt |
35 | 25 | - name: Test publish
|
36 | 26 | env:
|
37 |
| - # SEE https://packaging.python.org/en/latest/specifications/pypirc/?highlight=token#using-a-pypi-token |
38 |
| - FLIT_USERNAME: __token__ |
39 |
| - FLIT_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }} |
40 |
| - run: bash dev/publish.sh "testpypi" |
41 |
| - - name: Dump GitHub context |
42 |
| - env: |
43 |
| - GITHUB_CONTEXT: ${{ toJson(github) }} |
44 |
| - run: echo "$GITHUB_CONTEXT" |
| 27 | + UV_PUBLISH_TOKEN: "${{ secrets.TESTPYPI_API_TOKEN }}" |
| 28 | + run: | |
| 29 | + bash dev/publish.sh testpypi |
45 | 30 |
|
46 | 31 | test-published-package:
|
47 | 32 | needs:
|
48 | 33 | - publish
|
49 | 34 | runs-on: ubuntu-latest
|
| 35 | + strategy: |
| 36 | + matrix: |
| 37 | + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] |
50 | 38 | defaults:
|
51 | 39 | run:
|
52 | 40 | shell: bash
|
53 |
| - strategy: |
54 |
| - matrix: |
55 |
| - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] |
56 | 41 | steps:
|
57 |
| - - name: Dump GitHub context |
58 |
| - env: |
59 |
| - GITHUB_CONTEXT: ${{ toJson(github) }} |
60 |
| - run: echo "$GITHUB_CONTEXT" |
61 | 42 | - uses: actions/checkout@v4
|
62 | 43 | - name: Set up Python
|
63 | 44 | uses: actions/setup-python@v5
|
|
68 | 49 | python3 -m pip install -U pip==23.1.0
|
69 | 50 | python3 -m pip install \
|
70 | 51 | --index-url https://test.pypi.org/simple/ \
|
| 52 | + --extra-index-url https://pypi.org/simple/ \ |
71 | 53 | --force-reinstall \
|
72 | 54 | --use-feature=fast-deps \
|
73 | 55 | -U dbt-artifacts-parser=="${{ github.event.inputs.dbt_artifacts_parser_version }}"
|
74 |
| - - name: Test pacakge |
| 56 | + # It takes some time when the package gets available. |
| 57 | + - name: Sleep |
| 58 | + run: | |
| 59 | + sleep 30 |
| 60 | + - name: Test package |
75 | 61 | run: |
|
76 | 62 | python -c 'import dbt_artifacts_parser; print(dbt_artifacts_parser.__version__)'
|
0 commit comments