Add workflow to output github.ref when the triggering event is a release #101
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
# automatically runs pytest to test the length conversion program whenever code is pushed to github | |
name: test-conversion-program | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
run-pytest-only: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
container: | |
image: ghcr.io/${{ github.repository }}/learn-maintenance-image-${{ matrix.python-version }}:latest | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: python --version | |
- run: pytest | |
run-coveralls: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/${{ github.repository }}/learn-maintenance-image-3.7:latest | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: python --version | |
- run: coverage run -m --source=. pytest | |
- run: coverage lcov | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/github-action@master | |
with: | |
path-to-lcov: ./coverage.lcov | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- run: coverage report |