Skip to content

chore: updates CI runners and handles failing Windows test #268

chore: updates CI runners and handles failing Windows test

chore: updates CI runners and handles failing Windows test #268

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GOTOOLCHAIN: auto
permissions:
contents: read
jobs:
test-makefile:
name: Build and test makefile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: 'stable'
check-latest: true
cache: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make tar diffutils bzip2 gzip curl git
- name: Run make
run: make
- name: Upload results to Codecov
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./test/coverage/integration.out,./test/coverage/unit.out
test-fedora:
name: Build and test Fedora on multiple runners
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, ubuntu-24.04-arm ]
container:
image: quay.io/fedora/fedora:44
options: --user root
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up GO
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: 'stable'
check-latest: true
cache: true
- name: Install dependencies
run: |
dnf update -y
dnf install -y make tar diffutils bzip2 gzip curl git which
- name: Mark repo as safe for git
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Build and test
run: make
version-release:
runs-on: ubuntu-latest
needs: [test-makefile, test-fedora, test-macos, test-windows]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
# version-release needs write permissions to push tags; all other permissions are implicitly none
contents: write
steps:
- name: Github app installation token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
id: app-token
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PK }}
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
fetch-tags: true
token: ${{ steps.app-token.outputs.token }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
test-macos:
name: Build and test on macOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest]
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install dependencies
run: |
brew update
brew install golang make diffutils git grep gnu-tar
- name: Build and test
run: make
test-windows:
name: Build and test on Windows
runs-on: ${{ matrix.os }}
env:
CGO_ENABLED: 0
strategy:
matrix:
os: [ windows-latest]
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: 'stable'
check-latest: true
cache: true
- name: Install dependencies
run: |
choco install -y make diffutils gzip bzip2 git
- name: Build and test
run: bash -c "make"