-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (35 loc) · 1.6 KB
/
ci.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
name: CI
on:
push:
jobs:
ci:
runs-on: ubuntu-20.04
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
SQLALCHEMY_URL: ${{ secrets.SQLALCHEMY_URL }}
ALLOW_SLOW_TESTS: "yes"
run: |
curl -s https://raw.githubusercontent.com/OriHoch/uumpa-ci-toolbox/65a0704332e63d51f63981dbb25cd83682dc4078/bin/github_actions_install.sh \
| bash -s 4d163c416a5c7192e4f4dba883bb4c0480eaee8c OriHoch/uumpa-ci-toolbox &&\
uci github actions self-checkout --config-user-name "open-bus-stride-client-ci" &&\
uci git checkout --github-repo-name hasadna/open-bus-stride-api --branch-name main \
--config-user-name "open-bus-stride-client-ci" \
--fetch-depth 1 --path ../open-bus-stride-api &&\
uci git checkout --github-repo-name hasadna/open-bus-stride-db --branch-name main \
--config-user-name "open-bus-stride-client-ci" \
--fetch-depth 1 --path ../open-bus-stride-db &&\
pip install -e .[all] &&\
pip install -r ../open-bus-stride-api/requirements-dev.txt &&\
pip install -e ../open-bus-stride-api &&\
pip install -r tests/requirements.txt &&\
pytest &&\
TAG_NAME="$(uci github actions get-tag-name)" &&\
if [ "${TAG_NAME}" != "" ]; then
echo "${TAG_NAME}" > VERSION.txt &&\
pip install --upgrade build pip twine &&\
python3 -m build &&\
python3 -m twine upload "dist/open-bus-stride-client-${TAG_NAME}.tar.gz"
fi