@@ -12,32 +12,34 @@ jobs:
12
12
max-parallel : 4
13
13
fail-fast : true
14
14
matrix :
15
- example :
16
- [
17
- ibc-asset-list,
18
- vote-proposal,
19
- ibc-transfer,
20
- swap-tokens,
21
- provide-liquidity,
22
- connect-chain,
23
- connect-multi-chain,
24
- ]
15
+ include :
16
+ - name : authz
17
+ folder : examples
18
+ - name : ibc-asset-list
19
+ folder : examples
20
+ - name : injective
21
+ folder : examples
22
+ - name : injective-vue
23
+ folder : examples
24
+ - name : stake-tokens
25
+ folder : examples
26
+ - name : vote-proposal
27
+ folder : examples
28
+ - name : chain-template
29
+ folder : templates
30
+ - name : connect-chain
31
+ folder : templates
32
+ - name : connect-multi-chain
33
+ folder : templates
25
34
26
35
steps :
27
36
- name : Checkout repository
28
37
uses : actions/checkout@v4
29
38
30
39
- name : Set template_path Environment Variable
31
40
run : |
32
- example_value="${{ matrix.example }}"
33
-
34
- if [[ "$example_value" == "connect-chain" ]] || [[ "$example_value" == "connect-multi-chain" ]]; then
35
- echo "template_path=templates" >> $GITHUB_ENV
36
- echo "ci_template_path=dest" >> $GITHUB_ENV
37
- else
38
- echo "template_path=examples" >> $GITHUB_ENV
39
- echo "ci_template_path=dest" >> $GITHUB_ENV
40
- fi
41
+ echo "template_path=${{ matrix.folder }}" >> $GITHUB_ENV
42
+ echo "ci_template_path=dest" >> $GITHUB_ENV
41
43
42
44
- name : Log
43
45
run : |
@@ -46,11 +48,10 @@ jobs:
46
48
47
49
- name : Clone example
48
50
run : |
49
- echo "Cloning example: ./$template_path/${{ matrix.example }}/" into "${{ github.workspace }}/$ci_template_path/${{ matrix.example }}"
50
-
51
- mkdir -p ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
52
- cp -r ./$template_path/${{ matrix.example }}/ ${{ github.workspace }}/$ci_template_path/
53
- cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
51
+ echo "Cloning example: ./$template_path/${{ matrix.name }}/ into ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}"
52
+ mkdir -p ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}
53
+ cp -r ./$template_path/${{ matrix.name }}/ ${{ github.workspace }}/$ci_template_path/
54
+ cd ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}
54
55
55
56
- name : Set up Node.js
56
57
uses : actions/setup-node@v4
@@ -69,17 +70,14 @@ jobs:
69
70
with :
70
71
path : |
71
72
${{ github.workspace }}/.next/cache
72
- # Generate a new cache whenever packages or source files change.
73
- # key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
74
73
key : ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ env.DIFF_HASH }}
75
- # If source files changed but packages didn't, rebuild from a prior cache.
76
74
restore-keys : |
77
75
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
78
76
79
77
- name : Build example project
80
78
run : |
81
- echo "Building example: ${{ matrix.example }} in directory ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}"
82
- cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
79
+ echo "Building example: ${{ matrix.name }} in directory ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}"
80
+ cd ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}
83
81
ls -la
84
82
yarn install
85
- yarn build
83
+ yarn build
0 commit comments