<bot> update requirements.txt #1117
Workflow file for this run
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: wipac ci/cd | |
on: [push] | |
env: | |
CI_TEST: 'yes' | |
CLIENTMANAGER_IMAGE_WITH_TAG: 'ghcr.io/wipacrepo/skydriver:latest' | |
EWMS_PILOT_TASK_TIMEOUT: 999 | |
SCAN_BACKLOG_RUNNER_SHORT_DELAY: 1 | |
SCAN_BACKLOG_RUNNER_DELAY: 1 | |
SCAN_BACKLOG_PENDING_ENTRY_TTL_REVIVE: 200 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
# don't cancel on main/master/default | |
cancel-in-progress: ${{ format('refs/heads/{0}', github.event.repository.default_branch) != github.ref }} | |
jobs: | |
py-versions: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.versions.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: versions | |
uses: WIPACrepo/wipac-dev-py-versions-action@v2.1 | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- uses: WIPACrepo/wipac-dev-flake8-action@v1.0 | |
mypy: | |
needs: [py-versions] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
py3: ${{ fromJSON(needs.py-versions.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.py3 }} | |
- uses: WIPACrepo/wipac-dev-mypy-action@v1.2 | |
py-setup: | |
runs-on: ubuntu-latest | |
steps: | |
# dependabot can't access normal secrets | |
# & don't run non-branch triggers (like tags) | |
- if: | | |
github.actor != 'dependabot[bot]' && | |
github.ref_type == 'branch' | |
name: checkout (only for non-dependabot non-default branches) | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- if: | | |
github.actor != 'dependabot[bot]' && | |
github.ref_type == 'branch' | |
name: wipac-dev-py-setup-action (only for non-dependabot non-default branches) | |
uses: WIPACrepo/wipac-dev-py-setup-action@v1.15 | |
with: | |
base-keywords: WIPAC IceCube | |
unit-tests: | |
needs: [py-versions] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
py3: ${{ fromJSON(needs.py-versions.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.py3 }} | |
- name: pip install | |
run: | | |
pip install --upgrade pip wheel setuptools | |
pip install .[tests] | |
- name: Test | |
run: | | |
pytest -vvv tests/unit | |
- name: Dump logs | |
if: always() | |
run: | | |
cat pytest.logs | |
integration-tests: | |
needs: [py-versions] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
py3: ${{ fromJSON(needs.py-versions.outputs.matrix) }} | |
services: | |
mongo: | |
image: bitnami/mongodb:4 | |
ports: | |
- 27017:27017 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.py3 }} | |
- name: pip install | |
run: | | |
pip install --upgrade pip wheel setuptools | |
pip install .[tests] | |
- name: Test | |
run: | | |
export LATEST_TAG=$( \ | |
curl -I https://github.com/icecube/skymap_scanner/releases/latest \ | |
| awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}' \ | |
| sed 's/v//' \ | |
) | |
echo $LATEST_TAG # this tag may be off if there's a delay between GH release & docker hub | |
pytest -vvv tests/integration | |
- name: Dump logs | |
if: always() | |
run: | | |
cat pytest.logs | |
test-build-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: Dockerfile | |
tags: wipac/skydriver:local | |
release: | |
# only run on main/master/default | |
if: format('refs/heads/{0}', github.event.repository.default_branch) == github.ref | |
needs: [flake8, mypy, py-setup, unit-tests, integration-tests, test-build-docker] | |
runs-on: ubuntu-latest | |
concurrency: release | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Python Semantic Release | |
uses: python-semantic-release/python-semantic-release@master | |
with: | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
# repository_username: __token__ | |
# repository_password: ${{ secrets.PYPI_TOKEN }} |