Merge pull request #467 from equilibria-xyz/dospore/update-docs-link #1910
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
name: Automated Tests and Linting | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: | |
- main | |
- v2.1 | |
- v2.1.1 | |
- v2.2 | |
workflow_dispatch: | |
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: 18.19 | |
- 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 | |
MOCHA_RETRY_COUNT: 2 | |
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 | |
MOCHA_RETRY_COUNT: 2 | |
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 | |
MOCHA_RETRY_COUNT: 2 | |
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 | |
MOCHA_RETRY_COUNT: 2 | |
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' }} | |
oracle-integrationSepolia-test: | |
name: '[Oracle] Sepolia 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 | |
MOCHA_RETRY_COUNT: 2 | |
ARBITRUM_SEPOLIA_NODE_URL: ${{ secrets.ARBITRUM_SEPOLIA_NODE_URL }} | |
run: | | |
yarn workspace @equilibria/perennial-v2-oracle run ${{ env.PARSER_BROKEN != 'true' && 'coverage:integrationSepolia' || 'test:integrationSepolia' }} | |
- name: '[Oracle] Sepolia Integration Test Coverage Report' | |
uses: romeovs/[email protected] | |
with: | |
title: '[Oracle] Sepolia 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' }} | |
# [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 | |
MOCHA_RETRY_COUNT: 2 | |
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 | |
MOCHA_RETRY_COUNT: 2 | |
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 | |
MOCHA_RETRY_COUNT: 2 | |
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 | |
MOCHA_RETRY_COUNT: 2 | |
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' }} |