mirror of
https://github.com/foomo/gotsrpc.git
synced 2026-06-28 22:00:03 +00:00
59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
name: Test Branch
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
merge_group:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: jdx/mise-action@v3
|
|
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
check-latest: true
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Setup golangci-lint cache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: ~/.cache/golangci-lint
|
|
key: golangci-lint-${{ runner.os }}-${{ hashFiles('**/go.mod') }}
|
|
restore-keys: |
|
|
golangci-lint-${{ runner.os }}--
|
|
|
|
- uses: actions/setup-node@v6
|
|
|
|
- name: Run yarn install
|
|
working-directory: example
|
|
run: yarn install
|
|
|
|
- name: Run tidy
|
|
run: make tidy && git diff --exit-code
|
|
|
|
- name: Run generate
|
|
run: |
|
|
make generate
|
|
make examples
|
|
git diff --exit-code
|
|
|
|
- name: Run lint
|
|
run: make lint
|
|
|
|
- name: Run tests
|
|
run: make test
|