Skip to content

Merge branch 'britz-market-100-unit' #142

Merge branch 'britz-market-100-unit'

Merge branch 'britz-market-100-unit' #142

Workflow file for this run

name: Automated Tests and Linting
on:
push:
branches: [main]
pull_request:
branches:
- main
env:
CI: true
PARSER_BROKEN: false # set to true if Solidity parsing is currently broken, this will skip Linting and Coverage
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.13
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
if: ${{ env.PARSER_BROKEN != 'true' }}
- name: lint
run: yarn workspaces run lint
if: ${{ env.PARSER_BROKEN != 'true' }}
# [CORE]
core-unit-test:
name: '[Core] Unit Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
run: |
yarn workspace @equilibria/perennial-v2 run ${{ env.PARSER_BROKEN != 'true' && 'coverage' || 'test' }}
- name: '[Core] Unit Test Code Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Core] Unit Test Coverage Report'
lcov-file: ./packages/perennial/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
core-integration-test:
name: '[Core] Integration Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
MAINNET_NODE_URL: ${{ secrets.MAINNET_NODE_URL }}
run: |
yarn workspace @equilibria/perennial-v2 run ${{ env.PARSER_BROKEN != 'true' && 'coverage:integration' || 'test:integration' }}
- name: '[Core] Integration Test Code Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Core] Integration Test Coverage Report'
lcov-file: ./packages/perennial/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
# [ORACLE]
oracle-unit-test:
name: '[Oracle] Unit Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
run: |
yarn workspace @equilibria/perennial-v2-oracle run ${{ env.PARSER_BROKEN != 'true' && 'coverage' || 'test' }}
- name: '[Oracle] Unit Test Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Oracle] Unit Test Coverage Report'
lcov-file: ./packages/perennial-oracle/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
oracle-integration-test:
name: '[Oracle] Integration Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
MAINNET_NODE_URL: ${{ secrets.MAINNET_NODE_URL }}
run: |
yarn workspace @equilibria/perennial-v2-oracle run ${{ env.PARSER_BROKEN != 'true' && 'coverage:integration' || 'test:integration' }}
- name: '[Oracle] Integration Test Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Oracle] Integration Test Coverage Report'
lcov-file: ./packages/perennial-oracle/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
# [PAYOFF]
payoff-unit-test:
name: '[Payoff] Unit Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
run: |
yarn workspace @equilibria/perennial-v2-payoff run ${{ env.PARSER_BROKEN != 'true' && 'coverage' || 'test' }}
- name: '[Payoff] Unit Test Code Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Payoff] Unit Test Code Coverage Report'
lcov-file: ./packages/perennial-payoff/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
payoff-integration-test:
name: '[Payoff] Integration Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
MAINNET_NODE_URL: ${{ secrets.MAINNET_NODE_URL }}
run: |
yarn workspace @equilibria/perennial-v2-payoff run ${{ env.PARSER_BROKEN != 'true' && 'coverage:integration' || 'test:integration' }}
- name: '[Payoff] Integration Test Code Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Payoff] Integration Test Code Coverage Report'
lcov-file: ./packages/perennial-payoff/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
# [VAULT]
vault-unit-test:
name: '[Vault] Unit Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
run: |
yarn workspace @equilibria/perennial-v2-vault run ${{ env.PARSER_BROKEN != 'true' && 'coverage' || 'test' }}
- name: '[Vault] Unit Test Code Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Vault] Unit Test Coverage Report'
lcov-file: ./packages/perennial-vault/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
vault-integration-test:
name: '[Vault] Integration Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
MAINNET_NODE_URL: ${{ secrets.MAINNET_NODE_URL }}
run: |
yarn workspace @equilibria/perennial-v2-vault run ${{ env.PARSER_BROKEN != 'true' && 'coverage:integration' || 'test:integration' }}
- name: '[Vault] Integration Test Code Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Vault] Integration Test Coverage Report'
lcov-file: ./packages/perennial-vault/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
# [EXTENSIONS]
extensions-unit-test:
name: '[Extensions] Unit Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
run: |
yarn workspace @equilibria/perennial-v2-extensions run ${{ env.PARSER_BROKEN != 'true' && 'coverage' || 'test' }}
- name: '[Extensions] Unit Test Code Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Extensions] Unit Test Coverage Report'
lcov-file: ./packages/perennial-extensions/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}
extensions-integration-test:
name: '[Extensions] Integration Tests w/ Coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn workspaces run compile # compile all packages
- name: Run tests
env:
MOCHA_REPORTER: dot
MAINNET_NODE_URL: ${{ secrets.MAINNET_NODE_URL }}
run: |
yarn workspace @equilibria/perennial-v2-extensions run ${{ env.PARSER_BROKEN != 'true' && 'coverage:integration' || 'test:integration' }}
- name: '[Extensions] Integration Test Code Coverage Report'
uses: romeovs/[email protected]
with:
title: '[Extensions] Integration Test Coverage Report'
lcov-file: ./packages/perennial-extensions/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' && env.PARSER_BROKEN != 'true' }}