Skip to content

Add Alias @pmf for @pmFromFile #3644

Add Alias @pmf for @pmFromFile

Add Alias @pmf for @pmFromFile #3644

Workflow file for this run

name: Regression Tests
on:
push:
branches:
- main
paths-ignore:
- "**/*.md"
- "LICENSE"
pull_request:
paths-ignore:
- "**/*.md"
- "LICENSE"
jobs:
# Generate matrix of tags for all permutations of the tests
generate-matrix:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.generate.outputs.tags }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Generate tag combinations
id: generate
run: |
go run mage.go tagsmatrix > tags.json
echo "tags=$(cat tags.json)" >> $GITHUB_OUTPUT
shell: bash
test:
needs: generate-matrix
strategy:
matrix:
go-version: [1.22.x, 1.23.x]
os: [ubuntu-latest]
build-flag: ${{ fromJson(needs.generate-matrix.outputs.tags) }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Tests and coverage
run: |
export BUILD_TAGS=${{ matrix.build-flag }}
go run mage.go coverage
- name: "Codecov: General"
uses: codecov/codecov-action@5a605bd92782ce0810fa3b8acc235c921b497052 # v5
if: ${{ matrix.go-version == '1.22.x' }}
with:
files: build/coverage.txt
flags: default,${{ matrix.build-flag }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Codecov: Examples"
uses: codecov/codecov-action@5a605bd92782ce0810fa3b8acc235c921b497052 # v5
if: ${{ matrix.go-version == '1.22.x' }}
with:
files: build/coverage-examples.txt
flags: examples+${{ matrix.build-flag }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Codecov: FTW"
uses: codecov/codecov-action@5a605bd92782ce0810fa3b8acc235c921b497052 # v5
if: ${{ matrix.go-version == '1.22.x' }}
with:
files: build/coverage-ftw.txt
flags: ftw,${{ matrix.build-flag }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Codecov: Tinygo"
uses: codecov/codecov-action@5a605bd92782ce0810fa3b8acc235c921b497052 # v5
# only if coverage-tinygo.txt exists
if: ${{ matrix.go-version == '1.22.x' && hashFiles('build/coverage-tinygo.txt') != '' }}
with:
files: build/coverage-tinygo.txt
flags: tinygo,${{ matrix.build-flag }}
token: ${{ secrets.CODECOV_TOKEN }}
enforce-all-checks:
runs-on: ubuntu-latest
needs: test
permissions:
checks: read
steps:
- name: GitHub Checks
uses: poseidon/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}