diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 25ab6b388..28d924160 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -67,7 +67,7 @@ jobs: run: yarn test test-contracts: - name: Test storage layout and signatures + name: Test storage layout, signatures and look for unused errors runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -98,6 +98,12 @@ jobs: - name: Test function signatures run: yarn run test:signatures + - name: Run unused Solidity errors checker + uses: OffchainLabs/actions/check-unused-errors@main + with: + directory: './contracts' + exceptions_file: './test/unused-errors/exceptions.txt' + test-e2e: name: Test e2e runs-on: ubuntu-latest diff --git a/package.json b/package.json index 42067a24e..2714ab098 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "test:storage": "./scripts/storage_layout_test.bash", "test:signatures": "./scripts/signatures_test.bash", "test:mutation": "ts-node test-mutation/gambitTester.ts", + "test:unused:errors": "./test/unused-errors/find_unused_errors.sh", "deploy:local:token-bridge": "ts-node ./scripts/local-deployment/deployCreatorAndCreateTokenBridge.ts", "deploy:token-bridge-creator": "ts-node ./scripts/deployment/deployTokenBridgeCreator.ts", "create:token-bridge": "ts-node ./scripts/deployment/createTokenBridge.ts", diff --git a/test/unused-errors/exceptions.txt b/test/unused-errors/exceptions.txt new file mode 100644 index 000000000..e69de29bb