-
Notifications
You must be signed in to change notification settings - Fork 65
28 lines (26 loc) · 1.27 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Build
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Branch name
run: echo Running on branch ${{ github.ref_name }}
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
# Installs deps and builds
- run: MAINNET_PROVIDER_URL=${{ secrets.MAINNET_PROVIDER_URL }} POLYGON_PROVIDER_URL=${{ secrets.POLYGON_PROVIDER_URL }} ARBITRUM_PROVIDER_URL=${{ secrets.ARBITRUM_PROVIDER_URL }} GOERLI_PROVIDER_URL=${{ secrets.GOERLI_PROVIDER_URL }} MUMBAI_PROVIDER_URL=${{ secrets.MUMBAI_PROVIDER_URL }} GOERLI_ARBITRUM_PROVIDER_URL=${{ secrets.GOERLI_ARBITRUM_PROVIDER_URL }} GOERLI_OPTIMISM_PROVIDER_URL=${{ secrets.GOERLI_OPTIMISM_PROVIDER_URL }} FUJI_PROVIDER_URL=${{ secrets.FUJI_PROVIDER_URL }} GOERLI_BASE_PROVIDER_URL=${{ secrets.GOERLI_BASE_PROVIDER_URL }} BASE_PROVIDER_URL=${{ secrets.BASE_PROVIDER_URL }} npm install
# Runs tests
- run: MAINNET_PROVIDER_URL=${{ secrets.MAINNET_PROVIDER_URL }} npm run test_coverage
# Updates code coverage badge in readme
- name: Upload coverage to Codecov
run: npm run coverage -- -t ${{ secrets.CODECOV_TOKEN }}