Run everything inside of the docker container #504
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: servicelayer | |
on: [push] | |
jobs: | |
python: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Show ref | |
run: echo "$GITHUB_REF" | |
- name: Start Docker containers | |
run: docker compose up -d | |
- name: Run the code format check | |
run: docker compose exec shell make format-check | |
- name: Run the linter | |
run: docker compose exec shell make lint | |
- name: Run the tests | |
# Some tests rely on the package being installed | |
run: docker compose exec shell bash -c "make install && make tests" | |
- name: Build a distribution | |
run: docker compose exec shell python 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 }} |