Skip to content

Add scan CI step

Add scan CI step #16

Workflow file for this run

# Copyright (c) 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:
jobs:
run_token_messenger_tests:
name: "Run TokenMessengerMinter tests"
uses: circlefin/github-shared-pipelines/.github/workflows/[email protected]
if: ${{ github.repository_owner == 'circlefin' && github.ref != 'refs/heads/master' }}
with:
repository: ${{ github.repository }}
branch: ${{ github.ref }}
node_version: "20.14.0"
install_dependencies_command: bash setup.sh
run_command: |
sui move test --path packages/token_messenger_minter --coverage
sui move coverage summary --path packages/token_messenger_minter
coverage=$(sui move coverage summary --path packages/token_messenger_minter | grep "Move Coverage:" | grep -Eo "[0-9]+" | head -1)
[[ $coverage -ge 99 ]] || { echo "Test Coverage is only ${coverage}%. Should be at least 99%"; exit 1; }
runner: small-spot
run_message_transmitter_tests:
name: "Run MessageTransmitter tests"
uses: circlefin/github-shared-pipelines/.github/workflows/[email protected]
if: ${{ github.repository_owner == 'circlefin' && github.ref != 'refs/heads/master' }}
with:
repository: ${{ github.repository }}
branch: ${{ github.ref }}
node_version: "20.14.0"
install_dependencies_command: bash setup.sh
run_command: |
sui move test --path packages/message_transmitter --coverage
sui move coverage summary --path packages/message_transmitter
coverage=$(sui move coverage summary --path packages/message_transmitter | grep "Move Coverage:" | grep -Eo "[0-9]+" | head -1)
[[ $coverage -ge 99 ]] || { echo "Test Coverage is only ${coverage}%. Should be at least 99%"; exit 1; }
runner: small-spot
scan:
needs:
- run_token_messenger_tests
- run_message_transmitter_tests
if: github.event_name == 'pull_request'
uses: circlefin/circle-public-github-workflows/.github/workflows/pr-scan.yaml@v1
release-sbom:
needs:
- run_token_messenger_tests
- run_message_transmitter_tests
if: github.event_name == 'push'
uses: circlefin/circle-public-github-workflows/.github/workflows/attach-release-assets.yaml@v1