APS: duplicated affids removal #282
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: Run Python Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
release: | |
types: [published] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Build and Run Tests in Docker | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
dockerfile: Dockerfile | |
tags: tests_image | |
build-args: | | |
PYTHON_VERSION=2.7 | |
- name: Run tests with pytest and generate report | |
run: > | |
docker run | |
--name tests_container | |
--entrypoint pytest | |
--volume $(pwd):/app | |
tests_image | |
tests | |
--cov=./ | |
--cov-report=xml | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
- name: Build and push | |
if: ${{ github.event_name == 'push'}} | |
id: build | |
uses: cern-sis/gh-workflows/.github/actions/[email protected] | |
with: | |
image: scoap3/hepcrawl | |
username: scoap3 | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
cache: false | |
- name: Deploy QA | |
if: ${{ github.event_name == 'push'}} | |
uses: cern-sis/gh-workflows/.github/actions/[email protected] | |
with: | |
event-type: update | |
images: ${{ steps.build.outputs.image-tags }} | |
token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES }} | |
- name: Deploy PROD | |
if: ${{ github.event_name == 'release'}} | |
uses: cern-sis/gh-workflows/.github/actions/[email protected] | |
with: | |
event-type: release | |
images: ${{ steps.build.outputs.image-tags }} | |
token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES }} |