.github/workflows/push.yaml
# SPDX-FileCopyrightText: Copyright 2020-2023, Contributors to pocketutils
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/pocketutils
# SPDX-License-Identifier: Apache-2.0
name: Push
on:
push:
branches:
- main
- "releases/**"
permissions:
contents: write
statuses: write
actions: write
security-events: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test:
name: Test
uses: ./.github/workflows/test.yaml
secrets: inherit
send-coverage:
name: Update coveralls and codecov
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
# :tyranno: python: ${tool.hatch.envs.all.matrix.python~[0]~}
python: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Download coverage artifact for ${{ matrix.os }}/${{ matrix.python }}
uses: actions/download-artifact@v3
with:
name: coverage-${{ matrix.os }}-${{ matrix.python }}
- name: Send ${{ matrix.os }}/${{ matrix.python }} to coveralls
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
- name: Send ${{ matrix.os }}/${{ matrix.python }} to codecov
uses: codecov/codecov-action@v3
with:
env_vars: matrix.os,matrix.python
fail_ci_if_error: true
needs: [test]
finish:
needs: [send-coverage]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Send final data to coveralls
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
file: coverage.xml