|
7 | 7 | pull_request:
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - # setup: |
11 |
| - # runs-on: ubuntu-latest |
12 |
| - # steps: |
13 |
| - # - name: Checkout code |
14 |
| - # uses: actions/checkout@v4 |
15 |
| - |
16 |
| - # - name: Set up Go |
17 |
| - # uses: actions/setup-go@v5 |
18 |
| - # with: |
19 |
| - # go-version-file: go.mod |
20 |
| - |
21 |
| - # build: |
22 |
| - # runs-on: ubuntu-latest |
23 |
| - # needs: setup |
24 |
| - # steps: |
25 |
| - # - name: Checkout code |
26 |
| - # uses: actions/checkout@v4 |
27 |
| - |
28 |
| - # - name: Setup Mage |
29 |
| - # uses: magefile/mage-action@v3 |
30 |
| - # with: |
31 |
| - # install-only: true |
32 |
| - |
33 |
| - # - name: Build |
34 |
| - # run: | |
35 |
| - # mage -v build |
36 |
| - |
37 |
| - lint: |
| 10 | + build: |
38 | 11 | runs-on: ubuntu-latest
|
39 |
| - # needs: build |
40 | 12 | steps:
|
41 |
| - - uses: actions/checkout@v4 |
42 |
| - |
43 |
| - - name: Set up Go |
| 13 | + - name: Checkout |
| 14 | + uses: actions/checkout@v4 |
| 15 | + - name: Setup go |
44 | 16 | uses: actions/setup-go@v5
|
45 | 17 | with:
|
46 |
| - go-version-file: "go.mod" |
47 |
| - |
| 18 | + go-version-file: go.mod |
48 | 19 | - name: Setup Mage
|
49 |
| - run: go install github.com/magefile/mage@latest |
50 |
| - |
51 |
| - - name: Setup CI Linter |
52 |
| - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 |
| 20 | + uses: magefile/mage-action@v3 |
| 21 | + with: |
| 22 | + install-only: true |
53 | 23 |
|
54 |
| - - name: Lint |
| 24 | + - name: Build |
55 | 25 | run: |
|
56 |
| - mage -v lint |
| 26 | + mage -v build |
57 | 27 |
|
58 |
| - # test: |
59 |
| - # runs-on: ubuntu-latest |
60 |
| - # needs: lint |
61 |
| - # steps: |
62 |
| - # - name: Checkout code |
63 |
| - # uses: actions/checkout@v4 |
64 |
| - |
65 |
| - # - name: Install dependencies |
66 |
| - # run: | |
67 |
| - # sudo apt update |
68 |
| - # sudo apt install -y gcc |
| 28 | + test: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + needs: build |
| 31 | + steps: |
| 32 | + - name: Checkout |
| 33 | + uses: actions/checkout@v4 |
| 34 | + - name: Setup go |
| 35 | + uses: actions/setup-go@v5 |
| 36 | + with: |
| 37 | + go-version-file: go.mod |
| 38 | + - name: Install dependencies |
| 39 | + run: | |
| 40 | + sudo apt update |
| 41 | + sudo apt install -y gcc |
69 | 42 |
|
70 |
| - # - name: Setup Mage |
71 |
| - # uses: magefile/mage-action@v3 |
72 |
| - # with: |
73 |
| - # install-only: true |
| 43 | + - name: Setup Mage |
| 44 | + uses: magefile/mage-action@v3 |
| 45 | + with: |
| 46 | + install-only: true |
74 | 47 |
|
75 |
| - # - name: Test |
76 |
| - # run: | |
77 |
| - # CGO_ENABLED=1 mage -v testRace |
| 48 | + - name: Test |
| 49 | + run: | |
| 50 | + CGO_ENABLED=1 mage -v testRace |
0 commit comments