-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eea5f19
commit 884e56f
Showing
1 changed file
with
64 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,129 +23,83 @@ jobs: | |
with: | ||
action: persist | ||
|
||
# test: | ||
# runs-on: ubuntu-latest | ||
# needs: install_dependencies | ||
# steps: | ||
# - uses: bissolli/gh-action-persist-workspace@v1 | ||
# with: | ||
# action: retrieve | ||
# - name: Run tests | ||
# run: | | ||
# CI=true npm run test | ||
# - name: Store artifacts | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: test | ||
# path: test | ||
|
||
# scenarios: | ||
# runs-on: ubuntu-latest | ||
# needs: install_dependencies | ||
# steps: | ||
# - uses: bissolli/gh-action-persist-workspace@v1 | ||
# with: | ||
# action: retrieve | ||
# - name: Run scenarios | ||
# run: | | ||
# CI=true npm run scenarios | ||
# - name: Store artifacts | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: scenarios | ||
# path: scenarios | ||
|
||
# lint: | ||
# runs-on: ubuntu-latest | ||
# needs: install_dependencies | ||
# steps: | ||
# - uses: bissolli/gh-action-persist-workspace@v1 | ||
# with: | ||
# action: retrieve | ||
# - name: Run Lint | ||
# run: npm run lint | ||
# - name: Store artifacts | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: lint | ||
# path: lint | ||
|
||
# coverage: | ||
# runs-on: ubuntu-latest | ||
# needs: install_dependencies | ||
# steps: | ||
# - uses: bissolli/gh-action-persist-workspace@v1 | ||
# with: | ||
# action: retrieve | ||
# - name: Run Coverage | ||
# run: npm run coverage | ||
# - name: Upload coverage to Coveralls | ||
# uses: coverallsapp/github-action@v2 | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Store artifacts | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: coverage | ||
# path: coverage | ||
|
||
# slither: | ||
# runs-on: ubuntu-latest | ||
# needs: install_dependencies | ||
# steps: | ||
# - uses: bissolli/gh-action-persist-workspace@v1 | ||
# with: | ||
# action: retrieve | ||
# - name: Run Slither | ||
# uses: crytic/[email protected] | ||
# id: slither | ||
# with: | ||
# node-version: 16 | ||
# sarif: results.sarif | ||
# fail-on: high | ||
|
||
gasCompare: | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run GasCompare | ||
- name: Run tests | ||
run: | | ||
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then | ||
BRANCH_NAME=$GITHUB_HEAD_REF | ||
else | ||
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g') | ||
fi | ||
echo "Current branch is $BRANCH_NAME" | ||
if [ "$BRANCH_NAME" == "master" ]; then | ||
echo "This is the master branch. Exiting..." | ||
exit 0 | ||
fi | ||
CI=true npm run test | ||
mv ./gasReporterOutput.json /tmp/gasReporterOutput_Current.json | ||
git checkout master | ||
npm install | ||
CI=true npm run test | ||
mv ./gasReporterOutput.json /tmp/gasReporterOutput_Master.json | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
action: persist | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
name: test | ||
path: test | ||
|
||
scenarios: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
|
||
- name: Run GasCompare | ||
- name: Run scenarios | ||
run: | | ||
ls -la | ||
npm run gasCompare /tmp/gasReporterOutput_Current.json /tmp/gasReporterOutput_Master.json | ||
CI=true npm run scenarios | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: scenarios | ||
path: scenarios | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run Lint | ||
run: npm run lint | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lint | ||
path: lint | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run Coverage | ||
run: npm run coverage | ||
- name: Upload coverage to Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage | ||
path: coverage | ||
|
||
|
||
slither: | ||
runs-on: ubuntu-latest | ||
needs: install_dependencies | ||
steps: | ||
- uses: bissolli/gh-action-persist-workspace@v1 | ||
with: | ||
action: retrieve | ||
- name: Run Slither | ||
uses: crytic/[email protected] | ||
id: slither | ||
with: | ||
node-version: 16 | ||
sarif: results.sarif | ||
fail-on: high |