-
Notifications
You must be signed in to change notification settings - Fork 13
49 lines (46 loc) · 1.56 KB
/
build-calitp-map-utils.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: Test, visualize, and build calitp-map-utils
on:
push:
branches:
- 'main'
paths:
- '.github/workflows/build-calitp-map-utils.yml'
- 'apps/maps/calitp_map_utils/**'
pull_request:
paths:
- '.github/workflows/build-calitp-map-utils.yml'
- 'apps/maps/calitp_map_utils/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check_and_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/maps
steps:
- uses: actions/checkout@v3
- run: sudo apt-get install -y libgraphviz-dev graphviz-dev
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: |
curl -sSL https://install.python-poetry.org | python -
poetry install
poetry run mypy calitp_map_utils
poetry run pytest --spec
poetry build
env:
CALITP_MAP_APP_URL: https://embeddable-maps.calitp.org/
- if: ${{ github.ref != 'refs/heads/main' }}
run: |
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi $POETRY_TEST_PYPI_TOKEN_PYPI
poetry publish -r test-pypi --skip-existing
env:
POETRY_TEST_PYPI_TOKEN_PYPI: ${{ secrets.TEST_PYPI_CALITP_MAP_UTILS_TOKEN }}
- if: ${{ github.ref == 'refs/heads/main' }}
run: poetry publish --skip-existing
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_CALITP_MAP_UTILS_TOKEN }}