-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1007 Bytes
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
test:
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/ojo-network/indexer
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/setup-go@v4
if: env.GIT_DIFF
with:
go-version: '1.20'
cache: true
- run: git config --global url.https://[email protected]/.insteadOf https://github.com/
- name: Test
if: env.GIT_DIFF
run: |
make test-unit