forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (78 loc) · 2.39 KB
/
Copy pathci-dir-examples.yml
File metadata and controls
85 lines (78 loc) · 2.39 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: ci / examples
on:
push:
branches:
- master
pull_request:
paths:
- gnovm/**
- examples/**
- misc/deployments/**
- contribs/gnogenesis/**
- .github/workflows/ci-dir-examples.yml
workflow_dispatch:
inputs:
debug:
description: Enable debug mode for gno test
required: false
default: false
type: boolean
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
gno2go:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
- run: go install -v ./gnovm/cmd/gno
- run: go run ./gnovm/cmd/gno tool transpile -C examples -v --gobuild .
gno-checks:
uses: ./.github/workflows/_ci-gno.yml
with:
debug: ${{ inputs.debug || false }}
path: "examples"
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
- working-directory: examples
run: |
if make -qp | grep -q '^generate:'; then
make generate
if [ "$(git status -s)" != "" ]; then
echo "'make generate' creates files that differ from the git tree, please run 'make generate' and commit:"
git status -s
git diff
exit 1
fi
else
echo "'make generate' rule not found, skipping."
fi
mod-tidy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
- working-directory: ./examples
run: |
make tidy
git diff --exit-code || (echo "Some gnomod.toml files are not tidy, please run 'make tidy'." && exit 1)