Skip to content

Update action

Update action #15

Workflow file for this run

on:
push:
branches: [ '*' ]
jobs:
run-python-unit-tests:
name: Run python unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
run: |
docker build -t python_measure_test .
docker run --rm \
-v ${{ github.workspace }}/test-results:/app/test-results \
python_measure_test
- name: Check for FAILURE in pytest_output.txt
run: |
cat ${{ github.workspace }}/test-results/pytest_output.txt
if grep -q 'FAILURE' ${{ github.workspace }}/test-results/pytest_output.txt; then
exit 1
fi
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results/