mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2024-04-21 12:21:34 +00:00
* Chore: check Go modules before test & update dependencies * Chore: run go fmt to format code
44 lines
876 B
YAML
44 lines
876 B
YAML
name: Test
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "**/*.go"
|
|
- "go.mod"
|
|
- "go.sum"
|
|
- ".github/workflows/test.yml"
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "**/*.go"
|
|
- "go.mod"
|
|
- "go.sum"
|
|
- ".github/workflows/test.yml"
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ^1.17.1
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Check Go modules
|
|
run: |
|
|
go mod tidy -compat=1.17
|
|
git diff --exit-code go.mod go.sum
|
|
go mod verify
|
|
|
|
- name: Test
|
|
run: make test
|