Skip to content

Commit c977126

Browse files
committed
add ci , codeowners, dependabot
1 parent 6dafbf3 commit c977126

File tree

4 files changed

+87
-0
lines changed

4 files changed

+87
-0
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @alexcos20 @lacoop6tu @trentmc

.github/ci.yaml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: 'CI'
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '**'
9+
pull_request:
10+
branches:
11+
- '**'
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v2
19+
with:
20+
node-version: '16'
21+
- name: Cache node_modules
22+
uses: actions/cache@v2
23+
env:
24+
cache-name: cache-node-modules
25+
with:
26+
path: ~/.npm
27+
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
29+
- run: npm ci
30+
- run: npm npm install -g solhint
31+
- run: solhint contracts/**/*.sol
32+
33+
tests_full:
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- uses: actions/checkout@v2
38+
- uses: actions/setup-node@v2
39+
with:
40+
node-version: '16'
41+
- name: Cache node_modules
42+
uses: actions/cache@v2
43+
env:
44+
cache-name: cache-node-modules
45+
with:
46+
path: ~/.npm
47+
key: ${{ runner.os }}-test-unit-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
48+
restore-keys: ${{ runner.os }}-test-unit-${{ env.cache-name }}-
49+
- run: npm ci
50+
- name: Run Hardhate
51+
run: |
52+
npx hardhat node &
53+
- run: npm run test:full:cover
54+
- uses: actions/upload-artifact@v2
55+
with:
56+
name: coverage
57+
path: coverage/
58+
59+
coverage:
60+
runs-on: ubuntu-latest
61+
needs: [test_full]
62+
if: ${{ success() && github.actor != 'dependabot[bot]' }}
63+
steps:
64+
- uses: actions/checkout@v2
65+
- uses: actions/download-artifact@v2
66+
with:
67+
name: coverage
68+
69+
- uses: paambaati/[email protected]
70+
env:
71+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
72+
with:
73+
coverageLocations: |
74+
${{ github.workspace }}/unit/lcov.info:lcov
75+
${{ github.workspace }}/integration/lcov.info:lcov

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: '03:00'
8+
timezone: Europe/Berlin

.solhint.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "solhint:default"
3+
}

0 commit comments

Comments
 (0)