2021-03-02 17:46:50 +03:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
|
|
|
- ".github/workflows/*.yml"
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
paths:
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
|
|
|
- ".github/workflows/*.yml"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2022-02-20 06:53:11 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2021-03-02 17:46:50 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
2023-12-07 03:20:06 +03:00
|
|
|
uses: actions/setup-go@v5
|
2021-03-02 17:46:50 +03:00
|
|
|
with:
|
2023-08-26 09:26:27 +03:00
|
|
|
go-version: '1.21'
|
2022-02-21 17:13:35 +03:00
|
|
|
check-latest: true
|
2021-03-02 17:46:50 +03:00
|
|
|
- name: Checkout codebase
|
2023-09-05 03:43:27 +03:00
|
|
|
uses: actions/checkout@v4
|
2023-02-25 05:26:28 +03:00
|
|
|
- name: Restore Cache
|
|
|
|
uses: actions/cache/restore@v3
|
2023-02-24 20:29:45 +03:00
|
|
|
with:
|
2023-02-25 05:26:28 +03:00
|
|
|
path: resources
|
|
|
|
key: xray-geodat-
|
|
|
|
enableCrossOsArchive: true
|
2021-03-02 17:46:50 +03:00
|
|
|
- name: Test
|
|
|
|
run: go test -timeout 1h -v ./...
|