mirror of
https://github.com/moby/buildkit.git
synced 2026-11-06 05:16:45 +00:00
85 lines
2.0 KiB
YAML
85 lines
2.0 KiB
YAML
name: test-os
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 10 * * *'
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'v[0-9]+.[0-9]+'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'README.md'
|
|
- 'docs/**'
|
|
- 'frontend/dockerfile/docs/**'
|
|
|
|
env:
|
|
GO_VERSION: "1.20"
|
|
TESTFLAGS: "-v --parallel=6 --timeout=30m"
|
|
GOTESTSUM_VERSION: "v1.9.0" # same as one in Dockerfile
|
|
GOTESTSUM_FORMAT: "standard-verbose"
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
# - ubuntu-20.04
|
|
# - macOS-11
|
|
- windows-2022
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: "${{ env.GO_VERSION }}"
|
|
cache: true
|
|
-
|
|
name: Install gotestsum
|
|
run: |
|
|
go install gotest.tools/gotestsum@${{ env.GOTESTSUM_VERSION }}
|
|
-
|
|
name: Go mod
|
|
run: |
|
|
go mod download
|
|
-
|
|
name: Test
|
|
env:
|
|
TMPDIR: ${{ runner.temp }}
|
|
SKIP_INTEGRATION_TESTS: 1
|
|
run: |
|
|
mkdir -p ./bin/testreports
|
|
gotestsum \
|
|
--jsonfile="./bin/testreports/go-test-report.json" \
|
|
--junitfile="./bin/testreports/junit-report.xml" \
|
|
--packages="./..." \
|
|
-- \
|
|
"-coverprofile" "./bin/testreports/coverage.txt" \
|
|
"-covermode" "atomic" ${TESTFLAGS}
|
|
shell: bash
|
|
-
|
|
name: Send to Codecov
|
|
if: always()
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
directory: ./bin/testreports
|
|
env_vars: RUNNER_OS
|
|
flags: unit
|
|
-
|
|
name: Upload test reports
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: test-reports
|
|
path: ./bin/testreports
|