forked from OpenZeppelin/openzeppelin-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve GitHub Actions (OpenZeppelin#3451)
- Loading branch information
Showing
7 changed files
with
87 additions
and
97 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Setup | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
cache: npm | ||
- uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: '**/node_modules' | ||
key: npm-v3-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci --prefer-offline | ||
shell: bash | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
env: | ||
SKIP_COMPILE: true |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release-v* | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
|
||
concurrency: | ||
group: checks-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- run: npm run lint | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- run: npm run test | ||
env: | ||
FORCE_COLOR: 1 | ||
ENABLE_GAS_REPORT: true | ||
- run: npm run test:inheritance | ||
- run: npm run test:generation | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- run: npm run coverage | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=4096 | ||
- uses: codecov/codecov-action@v3 | ||
|
||
slither: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- uses: crytic/slither-action@v0.1.1 |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
if [ "${SKIP_COMPILE:-}" == true ]; then | ||
exit | ||
fi | ||
|
||
npm run clean | ||
env COMPILE_MODE=production npm run compile |