Skip to content

Commit 7561065

Browse files
Dargon789sourcery-ai[bot]github-advanced-security[bot]
authored
Create hardhat-core-sample-project-ci.yml (NomicFoundation#1841)
* Create hardhat-core-sample-project-ci.yml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update .github/workflows/hardhat-core-sample-project-ci.yml Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update .github/workflows/hardhat-core-sample-project-ci.yml Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update .github/workflows/hardhat-core-sample-project-ci.yml Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Potential fix for code scanning alert no. 290: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent bcb6da7 commit 7561065

1 file changed

Lines changed: 137 additions & 0 deletions

File tree

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
on: [push]
2+
3+
name: ci
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
install:
9+
name: Install dependencies
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 18
16+
- uses: actions/cache@v3
17+
id: yarn-cache
18+
with:
19+
path: |
20+
node_modules
21+
*/*/node_modules
22+
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
23+
- run: yarn install --network-concurrency 1
24+
if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
25+
26+
benchmark:
27+
name: Benchmark
28+
runs-on: ubuntu-latest
29+
needs: [install]
30+
steps:
31+
- uses: actions/checkout@v1
32+
- uses: actions/setup-node@v1
33+
with:
34+
node-version: 12
35+
- uses: actions/cache@master
36+
id: yarn-cache
37+
with:
38+
path: |
39+
node_modules
40+
*/*/node_modules
41+
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
42+
- run: yarn benchmark
43+
44+
lint-ts:
45+
name: Typescript lint
46+
runs-on: ubuntu-latest
47+
needs: [install]
48+
steps:
49+
- uses: actions/checkout@v1
50+
- uses: actions/setup-node@v1
51+
with:
52+
node-version: 12
53+
- uses: actions/cache@master
54+
id: yarn-cache
55+
with:
56+
path: |
57+
node_modules
58+
*/*/node_modules
59+
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
60+
- run: yarn lint:ts
61+
62+
lint-sol:
63+
name: Solidity lint
64+
runs-on: ubuntu-latest
65+
needs: [install]
66+
steps:
67+
- uses: actions/checkout@v1
68+
- uses: actions/setup-node@v1
69+
with:
70+
node-version: 12
71+
- uses: actions/cache@master
72+
id: yarn-cache
73+
with:
74+
path: |
75+
node_modules
76+
*/*/node_modules
77+
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
78+
- run: yarn lint:sol
79+
80+
test:
81+
name: Test contracts
82+
runs-on: ubuntu-latest
83+
needs: [install]
84+
steps:
85+
- uses: actions/checkout@v1
86+
- uses: actions/setup-node@v1
87+
with:
88+
node-version: 12
89+
- uses: actions/cache@master
90+
id: yarn-cache
91+
with:
92+
path: |
93+
node_modules
94+
*/*/node_modules
95+
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
96+
- run: yarn test
97+
98+
coverage:
99+
name: Coverage
100+
runs-on: ubuntu-latest
101+
needs: [install]
102+
steps:
103+
- uses: actions/checkout@v1
104+
- uses: actions/setup-node@v1
105+
with:
106+
node-version: 12
107+
- uses: actions/cache@master
108+
id: yarn-cache
109+
with:
110+
path: |
111+
node_modules
112+
*/*/node_modules
113+
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
114+
- run: yarn coverage || true
115+
- name: Coveralls
116+
uses: coverallsapp/github-action@master
117+
with:
118+
github-token: ${{ secrets.GITHUB_TOKEN }}
119+
120+
build:
121+
name: Is latest build commited?
122+
runs-on: ubuntu-latest
123+
needs: [install]
124+
steps:
125+
- uses: actions/checkout@v1
126+
- uses: actions/setup-node@v1
127+
with:
128+
node-version: 12
129+
- uses: actions/cache@master
130+
id: yarn-cache
131+
with:
132+
path: |
133+
node_modules
134+
*/*/node_modules
135+
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
136+
- run: yarn test
137+
- run: git diff --exit-code

0 commit comments

Comments
 (0)