mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 10:01:28 +00:00
573fb4f643
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
45 lines
936 B
YAML
45 lines
936 B
YAML
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:
|
|
permissions:
|
|
contents: read
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- name: Checkout codebase
|
|
uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.22'
|
|
check-latest: true
|
|
- name: Restore Cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: resources
|
|
key: xray-geodat-
|
|
enableCrossOsArchive: true
|
|
- name: Test
|
|
run: go test -timeout 1h -v ./...
|