mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
name: Tests
|
|
on: [push, pull_request]
|
|
permissions: read-all
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- linux-amd64-integration-1-cpu
|
|
- linux-amd64-integration-2-cpu
|
|
- linux-amd64-integration-4-cpu
|
|
- linux-amd64-unit-4-cpu-race
|
|
- linux-386-unit-1-cpu
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
|
with:
|
|
go-version: "1.19.5"
|
|
- run: date
|
|
- env:
|
|
TARGET: ${{ matrix.target }}
|
|
run: |
|
|
mkdir "${TARGET}"
|
|
export JUNIT_REPORT_DIR=$(realpath ${TARGET})
|
|
case "${TARGET}" in
|
|
linux-amd64-integration-1-cpu)
|
|
GOARCH=amd64 CPU=1 PASSES='integration' RACE='false' ./scripts/test.sh
|
|
;;
|
|
linux-amd64-integration-2-cpu)
|
|
GOARCH=amd64 CPU=2 PASSES='integration' RACE='false' ./scripts/test.sh
|
|
;;
|
|
linux-amd64-integration-4-cpu)
|
|
GOARCH=amd64 CPU=4 PASSES='integration' RACE='false' ./scripts/test.sh
|
|
;;
|
|
linux-amd64-unit-4-cpu-race)
|
|
GOARCH=amd64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2
|
|
;;
|
|
linux-386-unit-1-cpu)
|
|
GOARCH=386 PASSES='unit' RACE='false' CPU='1' ./scripts/test.sh -p=4
|
|
;;
|
|
*)
|
|
echo "Failed to find target"
|
|
exit 1
|
|
;;
|
|
esac
|
|
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
|
if: always()
|
|
with:
|
|
path: ./**/junit_*.xml
|