Skip to content

fix(github: test: merge): copy .coveragerc to workdir #865

fix(github: test: merge): copy .coveragerc to workdir

fix(github: test: merge): copy .coveragerc to workdir #865

Workflow file for this run

name: Tests
on:
push:
branches: [ master, ci ]
pull_request:
branches: [ master ]
env:
NUM_WORKERS: 20
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
worker_number: [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
steps:
- uses: actions/checkout@v2
- name: switch base image
run: sed -i -e 's|FROM archlinux:base-devel|FROM actionless/pikaur|' Dockerfile
- name: run tests in docker
#run: ./maintenance_scripts/docker_test.sh --coveralls
run: |
./maintenance_scripts/docker_test.sh \
--worker \
$(test ${NUM_WORKERS} -eq $((${{ matrix.worker_number }} + 1)) ; echo $?) \
${{ matrix.worker_number }},${NUM_WORKERS}
- name: Upload result_N.txt
uses: actions/upload-artifact@v3
with:
name: coverage_${{ matrix.worker_number }}
path: coverage_${{ matrix.worker_number }}
merge-results:
name: Merge Coverage Results
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v2
- uses: actions/checkout@v2
- name: move sourcecode to coverage location and copy coverage config to workdir
run: mkdir -p /opt/app-build/ ; mv pikaur /opt/app-build/ ; cp /opt/app-build/pikaur/.coveragerc ./
- name: Download all results
uses: actions/download-artifact@v3
with:
path: .
- name: Install Coveralls
run: python3 -m pip install coveralls
- name: Merge Results
run: |
coverage combine coverage_*/*
- name: Upload Coverage
run: |
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}