Update bridged USDC standard (#458) #33
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
# Copyright 2024 Circle Internet Financial, LTD. 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: | |
# 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@v3 | |
- 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@v3 | |
- name: Setup CI Environment | |
uses: ./.github/composite-actions/setup-ci | |
- 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 | |
post_run_hardhat_tests: | |
runs-on: ubuntu-latest | |
needs: [run_hardhat_tests] | |
if: always() | |
steps: | |
- name: Download test results | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: junit-report-* | |
- name: Publish combined test report | |
uses: mikepenz/action-junit-report@v4 | |
with: | |
check_name: upload_test_results | |
job_summary: true | |
detailed_summary: true | |
report_paths: "./junit-report-*/junit.xml" | |
scan: | |
if: github.event_name == 'pull_request' | |
uses: circlefin/circle-public-github-workflows/.github/workflows/[email protected] | |
with: | |
allow-reciprocal-licenses: false | |
release-sbom: | |
if: github.event_name == 'push' | |
uses: circlefin/circle-public-github-workflows/.github/workflows/attach-release-assets.yaml@v1 |