Files
kopia/.github/workflows/tests.yml
Julio López 3e9103417e chore(ci): use GH Linux ARM runners (#4367)
* chore(ci): use GH Linux ARM runners
* cleanup: remove unnecessary condition for ARMHF
* remove ARMHF support in GHA workflows
* cleanup: remove unnecessary condition for self-hosted
2025-01-24 15:20:09 -08:00

67 lines
2.3 KiB
YAML

name: Tests
on:
pull_request:
branches: [ master ]
push:
# ci-sandbox is a branch dedicated to testing post-submit code.
branches: [ master, artifacts-pr ]
tags:
- v*
schedule:
# run on Mondays at 8AM
- cron: '0 8 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# environment variables shared between build steps
# do not include sensitive credentials and tokens here, instead pass them
# directly to tools that need them to limit the blast radius in case one of them
# becomes compromised and leaks credentials to external sites.
# required by Makefile
UNIX_SHELL_ON_WINDOWS: true
# set (to any value other than false) to trigger random unicode filenames testing (logs may be difficult to read)
ENABLE_UNICODE_FILENAMES: ${{ secrets.ENABLE_UNICODE_FILENAMES }}
# set (to any value other than false) to trigger very long filenames testing
ENABLE_LONG_FILENAMES: ${{ secrets.ENABLE_LONG_FILENAMES }}
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest, ubuntu-24.04-arm ]
name: Tests
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: 'go.mod'
check-latest: true
id: go
- name: Install Windows-specific packages
run: "choco install --no-progress -y make zip unzip curl"
if: ${{ contains(matrix.os, 'windows') }}
- name: Install macOS-specific packages
run: "sudo xcode-select -r"
if: ${{ contains(matrix.os, 'macos') }}
- name: Setup
run: make -j4 ci-setup
- name: Test Blob Index Manager V0
run: make test-index-blob-v0
- name: Tests
run: make ci-tests
- name: Integration Tests
run: make -j2 ci-integration-tests
- name: Upload Logs
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: logs-${{ matrix.os }}
path: .logs/**/*.log
if-no-files-found: ignore
if: ${{ always() }}