Skip to content

Commit

Permalink
Refactor go.yml and add P12 certificate decoding for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arvvoid committed Sep 18, 2024
1 parent 850bc71 commit dcebd8d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
Expand All @@ -13,6 +10,10 @@ jobs:

build:
runs-on: ubuntu-latest
env:
FISKALHRGO_TEST_CERT_PATH: ${{ secrets.FISKALHRGO_TEST_CERT_PATH }}
FISKALHRGO_TEST_CERT_PASSWORD: ${{ secrets.FISKALHRGO_TEST_CERT_PASSWORD }}
FISKALHRGO_TEST_CERT_OIB: ${{ secrets.FISKALHRGO_TEST_CERT_OIB }}
steps:
- uses: actions/checkout@v4

Expand All @@ -24,5 +25,12 @@ jobs:
- name: Build
run: go build -v ./...

# Decode and save the P12 certificate (needed for tests)
- name: Decode and save the P12 certificate
run: |
echo "$CIS_P12_BASE64" | base64 -d > /tmp/fiskal.p12
env:
CIS_P12_BASE64: ${{ secrets.CIS_P12_BASE64 }}

- name: Test
run: go test -v ./...

0 comments on commit dcebd8d

Please sign in to comment.