Skip to content

Commit 81d5ce2

Browse files
authored
ci: Update to functional test case (#20)
* test: Moved configuration test cases under functional/COMPONENT * ci: Moved name of Solidity Linting task * ci: Move test suite linting to analysis workflow * ci: Use matrix for individual test suites
1 parent 72b403b commit 81d5ce2

10 files changed

Lines changed: 38 additions & 30 deletions

File tree

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
name: Solidity
1+
name: Lint
22

3-
on:
4-
push:
5-
branches: [master, develop]
6-
pull_request:
7-
branches: [master, develop]
3+
on: [push]
84

95
jobs:
106

11-
lint:
7+
solidity:
128
runs-on: ubuntu-latest
139

1410
steps:
@@ -35,3 +31,21 @@ jobs:
3531

3632
- name: Run linter on *.sol and *.json
3733
run: yarn run lint:check
34+
35+
brownie:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v1
39+
40+
- name: Set up Python 3.8
41+
uses: actions/setup-python@v1
42+
with:
43+
python-version: 3.8
44+
45+
- name: Install black
46+
run: pip install -r requirements-dev.txt
47+
48+
- name: Run Black
49+
run: black .
50+
51+
# TODO: Add Slither Static Analyzer

.github/workflows/test.yaml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ env:
88

99
jobs:
1010

11-
lint:
11+
brownie:
1212
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
type: [functional]
18+
1319
steps:
1420
- uses: actions/checkout@v1
1521

16-
- name: Set up Python 3.8
17-
uses: actions/setup-python@v1
22+
- name: Cache Compiler Installations
23+
uses: actions/cache@v2
1824
with:
19-
python-version: 3.8
20-
21-
- name: Install black
22-
run: pip install -r requirements-dev.txt
23-
24-
- name: Run Black
25-
run: black .
25+
path: |
26+
~/.solcx
27+
~/.vvm
28+
key: compiler-cache
2629

27-
test:
28-
runs-on: ubuntu-latest
29-
steps:
3030
- name: Check ETHERSCAN_TOKEN
3131
run: |
3232
if [ -z "$ETHERSCAN_TOKEN" ] ; then
@@ -39,15 +39,6 @@ jobs:
3939
echo "Missing ENV variable WEB3_INFURA_PROJECT_ID"
4040
exit 1
4141
fi
42-
- uses: actions/checkout@v1
43-
44-
- name: Cache Compiler Installations
45-
uses: actions/cache@v2
46-
with:
47-
path: |
48-
~/.solcx
49-
~/.vvm
50-
key: compiler-cache
5142
5243
- name: Setup Node.js
5344
uses: actions/setup-node@v1
@@ -64,4 +55,4 @@ jobs:
6455
run: pip install -r requirements-dev.txt
6556

6657
- name: Run Tests
67-
run: brownie test -s --coverage
58+
run: brownie test -s --coverage tests/${{ matrix.type }}/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Just here to disambiguate the test files (can't use same name without a module)
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Just here to disambiguate the test files (can't use same name without a module)
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Just here to disambiguate the test files (can't use same name without a module)

0 commit comments

Comments
 (0)