Skip to content

ci: run Windows unit tests on every PR #7798

ci: run Windows unit tests on every PR

ci: run Windows unit tests on every PR #7798

Workflow file for this run

name: Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
test-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Keyring
run: |
sudo apt-get update
sudo apt-get install -y gnome-keyring
echo 'somecredstorepass' | gnome-keyring-daemon --unlock
- uses: jdx/mise-action@f10502fc09dadecfefb962fff68ce77213930204 # v4
- name: Core Tests
env:
GO_TEST_PARALLEL: "16"
run: mise run test:ci:core
test-integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [a, b, c]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Keyring
run: |
sudo apt-get update
sudo apt-get install -y gnome-keyring
echo 'somecredstorepass' | gnome-keyring-daemon --unlock
- uses: jdx/mise-action@f10502fc09dadecfefb962fff68ce77213930204 # v4
- name: Integration Tests
env:
GO_TEST_PARALLEL: "16"
run: mise run test:ci:integration:shard -- ${{ matrix.shard }}
test-canary:
runs-on: ubuntu-latest
strategy:
fail-fast: false
# Run the (no-cost, no-API) Vogon canary against each checkpoint backend so
# the git-refs store is guarded on every PR alongside the default git-branch.
matrix:
checkpoint_store: [git-branch, git-refs]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Keyring
run: |
sudo apt-get update
sudo apt-get install -y gnome-keyring
echo 'somecredstorepass' | gnome-keyring-daemon --unlock
- uses: jdx/mise-action@f10502fc09dadecfefb962fff68ce77213930204 # v4
- name: E2E Canary
env:
E2E_CHECKPOINT_STORE: ${{ matrix.checkpoint_store }}
run: mise run test:e2e:canary
test-windows:
runs-on: windows-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
# Real-Windows tests must include Windows or MSYS in their top-level
# test name so this job selects them without running POSIX-only harnesses.
- name: Windows unit tests
run: go test ./cmd/entire/cli/... -run '(Windows|MSYS)' -count=1 -v
test:
runs-on: ubuntu-latest
needs:
- test-core
- test-integration
- test-canary
- test-windows
if: ${{ always() }}
steps:
- name: Check dependencies
run: |
[ "${{ needs.test-core.result }}" = "success" ]
[ "${{ needs.test-integration.result }}" = "success" ]
[ "${{ needs.test-canary.result }}" = "success" ]
[ "${{ needs.test-windows.result }}" = "success" ]