Skip to content

Commit

Permalink
update ci test command & test normalization script
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed Apr 3, 2024
1 parent c4e4fa0 commit 97cdfcd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/cadence_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ jobs:
- name: Install Flow CLI
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/feature/stable-cadence/install.sh)"
- name: Flow CLI Version
run: flow version
run: flow-c1 version
- name: Update PATH
run: echo "/root/.local/bin" >> $GITHUB_PATH
- name: Run tests
run: sh local/run_cadence_tests.sh
- name: Normalize coverage report filepaths
run : sh ./local/normalize_coverage_report.sh
run: sh ./local/normalize_coverage_report.sh
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

11 changes: 10 additions & 1 deletion local/normalize_coverage_report.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
sed -i 's/A.0000000000000007.Serialize/cadence\/contracts\/utils\/Serialize.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.SerializeNFT/cadence\contracts\/SerializeNFT.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.SerializeNFT/cadence\contracts\/SerializeNFT.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.BridgePermissions/cadence\/contracts\/bridge\/BridgePermissions.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.ICrossVM/cadence\/contracts\/bridge\/ICrossVM.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.CrossVMNFT/cadence\/contracts\/bridge\/CrossVMNFT.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.FlowEVMBridgeConfig/cadence\/contracts\/bridge\/FlowEVMBridgeConfig.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.FlowEVMBridgeUtils/cadence\/contracts\/bridge\/FlowEVMBridgeUtils.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.FlowEVMBridgeTemplates/cadence\/contracts\/bridge\/FlowEVMBridgeTemplates.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.IFlowEVMNFTBridge/cadence\/contracts\/bridge\/FlowEVMBridge.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.FlowEVMBridge/cadence\/contracts\/bridge\/FlowEVMBridge.cdc/' coverage.lcov
sed -i 's/A.0000000000000007.EVMBridgeRouter/cadence\/contracts\/bridge\/EVMBridgeRouter.cdc/' coverage.lcov
2 changes: 1 addition & 1 deletion local/run_cadence_tests.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" cadence/tests/*_tests.cdc
flow-c1 test --cover --covercode="contracts" --coverprofile="coverage.lcov" cadence/tests/*_tests.cdc

0 comments on commit 97cdfcd

Please sign in to comment.