Refactor GitHub Actions workflow for cross-platform compatibility and… #10
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
name: Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
arch: [amd64, arm64, 386] | |
exclude: | |
- os: windows-latest | |
arch: arm64 | |
- os: macos-latest | |
arch: 386 | |
env: | |
CIS_P12_BASE64: ${{ secrets.CIS_P12_BASE64 }} | |
FISKALHRGO_TEST_CERT_PASSWORD: ${{ secrets.FISKALHRGO_TEST_CERT_PASSWORD }} | |
FISKALHRGO_TEST_CERT_OIB: ${{ secrets.FISKALHRGO_TEST_CERT_OIB }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
go118: | |
runs-on: ubuntu-latest | |
env: | |
CIS_P12_BASE64: ${{ secrets.CIS_P12_BASE64 }} | |
FISKALHRGO_TEST_CERT_PASSWORD: ${{ secrets.FISKALHRGO_TEST_CERT_PASSWORD }} | |
FISKALHRGO_TEST_CERT_OIB: ${{ secrets.FISKALHRGO_TEST_CERT_OIB }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go 1.18 | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.18' | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... |