Skip to content

Commit 676e5f6

Browse files
committed
Improve github actions workflow
1 parent 91101e2 commit 676e5f6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,41 @@ jobs:
5252

5353
needs: Go
5454

55+
env:
56+
SRC_DIR: src/github.com/${{ github.repository }}
57+
5558
steps:
59+
- name: Set up Go
60+
uses: actions/setup-go@v2
61+
with:
62+
go-version: '1.15.x'
63+
id: go
64+
65+
- name: Setup PATH
66+
run: |
67+
echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
68+
echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV"
69+
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
70+
5671
- name: Checkout
5772
uses: actions/checkout@v2
73+
with:
74+
path: ${{env.SRC_DIR}}
75+
76+
- name: Download dependencies
77+
working-directory: ${{env.SRC_DIR}}
78+
run: make deps
5879

5980
- name: Install Aligo
81+
working-directory: ${{env.SRC_DIR}}
6082
run: |
6183
wget https://apps.kaos.st/aligo/latest/linux/x86_64/aligo
6284
chmod +x aligo
6385
6486
- name: Print Aligo version info
87+
working-directory: ${{env.SRC_DIR}}
6588
run: ./aligo --version
6689

6790
- name: Check Go structs alignment info
91+
working-directory: ${{env.SRC_DIR}}
6892
run: ./aligo check ./...

0 commit comments

Comments
 (0)