Skip to content

[B2N] Nibiru Testnet #56

[B2N] Nibiru Testnet

[B2N] Nibiru Testnet #56

Workflow file for this run

# Copyright 2024 Circle Internet Group, Inc. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: CI
on:
push:
branches: [master]
pull_request:
permissions: read-all
# Celo USDC contracts violate Spurious Dragon with existing configs, so
# we need to lower the number of runs to decrease the contract size.
env:
OPTIMIZER_RUNS: 81250
jobs:
run_ci_tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup CI Environment
uses: ./.github/composite-actions/setup-ci
- name: Compile contracts
run: yarn compile
- name: Run static checks
run: yarn static-check
- name: Run size check
run: yarn contract-size
- name: Run forge tests
run: forge test -vvv
- name: Generate gas report
run: yarn gas-report
env:
ENABLE_GAS_REPORTER: true
run_hardhat_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-groups:
- grep: "FiatTokenV1:.*"
- grep: "FiatTokenV1_1:.*"
- grep: "FiatTokenV2:.*"
- grep: "FiatTokenV2_1:.*"
- grep: "FiatTokenV2_2:.*"
- grep: "FiatTokenV1:.*|FiatTokenV1_1:.*|FiatTokenV2:.*|FiatTokenV2_1:.*|FiatTokenV2_2:.*|gas costs"
invert: true
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup CI Environment
uses: ./.github/composite-actions/setup-ci
- name: Compile contracts
run: yarn compile
- name: Run hardhat tests
run: HARDHAT_TEST_GREP='${{ matrix.test-groups.grep }}' HARDHAT_TEST_INVERT='${{ matrix.test-groups.invert }}' yarn test
- name: Upload test results to artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: junit-report-${{ hashFiles('report/junit.xml') }}
path: report/junit.xml
scan:
if: github.event_name == 'pull_request'
uses: circlefin/circle-public-github-workflows/.github/workflows/pr-scan.yaml@v1
permissions:
pull-requests: write
contents: read
with:
allow-reciprocal-licenses: false