Skip to content

Commit 7448e6c

Browse files
committed
fix
1 parent 8882390 commit 7448e6c

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

.github/workflows/gno-fmt.yaml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
TOOLS_REF: "master"
2222

2323
jobs:
24-
format:
24+
lint:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout this repo
@@ -33,26 +33,23 @@ jobs:
3333
go-version: ${{ env.GO_VERSION }}
3434
cache: true
3535

36-
- name: Checkout tools repo
37-
uses: actions/checkout@v4
38-
with:
39-
repository: ${{ env.TOOLS_REPO }}
40-
ref: ${{ env.TOOLS_REF }} # master, latest commit
41-
path: toolsrepo
42-
fetch-depth: 1 # only latest commit
36+
- name: Ensure deps are downloaded
37+
run: go mod download
38+
39+
- name: Put $GOBIN on PATH
40+
run: echo "${GOBIN}" >> "$GITHUB_PATH"
4341

44-
- name: Install tools
42+
- name: Read pinned Gno version from go.mod
43+
id: gnoversion
4544
run: |
46-
cd toolsrepo
47-
# Install from the tools repo
48-
go install ./gnovm/cmd/gno
45+
V=$(go list -m -f '{{.Version}}' github.com/gnolang/gno)
46+
echo "version=$V" >> "$GITHUB_OUTPUT"
4947
50-
- name: Format check
51-
working-directory: packages
48+
- name: Install gno
5249
run: |
53-
UNFORMATTED=$(gofmt -l .)
54-
if [ -n "$UNFORMATTED" ]; then
55-
echo "These files need gofmt:"
56-
echo "$UNFORMATTED"
57-
exit 1
58-
fi
50+
go install github.com/gnolang/gno/gnovm/cmd/gno@${{ steps.gnoversion.outputs.version }}
51+
gno version
52+
53+
- name: Format
54+
working-directory: packages
55+
run: gno fmt -diff ./...

.github/workflows/gno-test.yaml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
TOOLS_REF: "master"
2222

2323
jobs:
24-
test:
24+
lint:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout this repo
@@ -33,20 +33,23 @@ jobs:
3333
go-version: ${{ env.GO_VERSION }}
3434
cache: true
3535

36-
- name: Checkout tools repo
37-
uses: actions/checkout@v4
38-
with:
39-
repository: ${{ env.TOOLS_REPO }}
40-
ref: ${{ env.TOOLS_REF }} # master, latest commit
41-
path: toolsrepo
42-
fetch-depth: 1 # only latest commit
36+
- name: Ensure deps are downloaded
37+
run: go mod download
38+
39+
- name: Put $GOBIN on PATH
40+
run: echo "${GOBIN}" >> "$GITHUB_PATH"
41+
42+
- name: Read pinned Gno version from go.mod
43+
id: gnoversion
44+
run: |
45+
V=$(go list -m -f '{{.Version}}' github.com/gnolang/gno)
46+
echo "version=$V" >> "$GITHUB_OUTPUT"
4347
44-
- name: Install tools
48+
- name: Install gno
4549
run: |
46-
cd toolsrepo
47-
# Install from the tools repo
48-
go install ./gnovm/cmd/gno
50+
go install github.com/gnolang/gno/gnovm/cmd/gno@${{ steps.gnoversion.outputs.version }}
51+
gno version
4952
5053
- name: Test
5154
working-directory: packages
52-
run: gno test ./... -v
55+
run: gno test ./... -v

0 commit comments

Comments
 (0)