DAG-2764 Update github actions ubuntu version. #59
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: Test and Publish Python Package | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: [3.8] | |
name: Run Tests/Linters | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
run: | | |
pip install poetry==1.3.2 | |
poetry install | |
sudo apt-get -y install python3-distutils | |
- name: Test | |
run: | | |
poetry run pytest --runslow | |
deploy: | |
needs: test | |
if: ${{ github.event_name == 'push' }} | |
runs-on: ubuntu-22.04 | |
name: Publish Package | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build and Publish Python Package | |
uses: ./ # Use action in the root directory. | |
id: publish | |
with: | |
pypi-username: ${{ secrets.PYPI_USERNAME }} | |
pypi-password: ${{ secrets.PYPI_PASSWORD }} | |