-
-
Notifications
You must be signed in to change notification settings - Fork 11
76 lines (66 loc) · 2.32 KB
/
ci.yaml
File metadata and controls
76 lines (66 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: ci
# Build and run all tests.
# - Triggers: All pushes and pull requests on any branch.
# - Runs on: All repositories (including forks)
on:
push:
branches: ['**']
pull_request:
branches: ['**']
workflow_dispatch:
inputs:
version-filter:
description: 'Version filter (e.g. 5, 4.0, 5.0.3). Empty = all.'
required: false
type: string
distro-filter:
description: 'Distro filter (e.g. bookworm). Empty = all.'
required: false
type: string
# Prevents overlapping runs of this workflow on the same branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
if: ${{ !(github.repository == 'FirebirdSQL/firebird-docker' && github.ref == 'refs/heads/master') }}
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install tools
shell: pwsh
run: |
Install-Module InvokeBuild -Force
Install-Module PSFirebird -MinimumVersion '1.0.0' -Force
- name: Build
shell: pwsh
run: |
$params = @{}
if ('${{ inputs.version-filter }}') { $params['VersionFilter'] = '${{ inputs.version-filter }}' }
if ('${{ inputs.distro-filter }}') { $params['DistributionFilter'] = '${{ inputs.distro-filter }}' }
Invoke-Build Build @params
- name: Test
shell: pwsh
run: |
$params = @{}
if ('${{ inputs.version-filter }}') { $params['VersionFilter'] = '${{ inputs.version-filter }}' }
if ('${{ inputs.distro-filter }}') { $params['DistributionFilter'] = '${{ inputs.distro-filter }}' }
Invoke-Build Test @params
- name: Run tag unit tests
# Verifies Get-ImageTags produces correct Docker tags (pure logic, no Docker required).
# Tag logic is arch-independent — run once on amd64 to avoid duplication.
if: matrix.arch == 'amd64'
shell: pwsh
run: |
Install-Module Pester -Force -SkipPublisherCheck
Invoke-Pester src/tags.tests.ps1 -Output Detailed -CI