Skip to content

Merge pull request #733 from ghostunnel/cs/release-workflow #263

Merge pull request #733 from ghostunnel/cs/release-workflow

Merge pull request #733 from ghostunnel/cs/release-workflow #263

Workflow file for this run

---
name: Test
permissions:
contents: read
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
name: Tests
strategy:
matrix:
version: [1.26.x]
os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.version }}
cache: false
id: go
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11.x'
- name: Install test dependencies (Linux)
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -y default-jre-headless
- name: Run tests
run: go tool mage -v test:all
- name: Codecov upload
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v6
with:
files: ./coverage/all.profile
flags: ${{ contains(matrix.os, 'ubuntu') && 'linux' || (contains(matrix.os, 'macos') && 'darwin' || 'windows') }}
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-docker:
name: Tests (PKCS#11/SoftHSM)
strategy:
matrix:
version: [1.26]
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.version }}
cache: false
- name: Run tests in Docker
run: GO_VERSION=${{ matrix.version }} go tool mage -v test:docker
- name: Codecov upload
uses: codecov/codecov-action@v6
if: ${{ github.actor != 'dependabot[bot]' }}
with:
files: ./coverage/all.profile
flags: linux
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}