-
Notifications
You must be signed in to change notification settings - Fork 5
29 lines (27 loc) · 976 Bytes
/
build.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
name: servicelayer
on: [push]
jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Show ref
run: echo "$GITHUB_REF"
- name: Build/pull Docker images
run: |
docker compose build shell
docker compose pull rabbitmq
- name: Run the code format check
run: docker compose run --rm shell make format-check
- name: Run the linter
run: docker compose run --rm shell make lint
- name: Run the tests
# Some tests rely on the package being installed
run: docker compose run --rm shell bash -c "make install && make test-local"
- name: Build a distribution
run: docker compose run --rm shell python3 setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}