diff --git a/.github/setup/action.yml b/.github/setup/action.yml index 3514ce8143..27f1435d66 100644 --- a/.github/setup/action.yml +++ b/.github/setup/action.yml @@ -13,7 +13,7 @@ runs: cache: 'yarn' - name: Installing dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable shell: bash - name: Derive appropriate SHAs for base and head for `nx affected` commands diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 92ec5bb6dd..86419f42ba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,8 @@ name: CI -on: push +on: pull_request +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true jobs: lint: runs-on: ubuntu-latest @@ -28,6 +31,7 @@ jobs: - name: Running tests run: yarn test:ci + coverage: runs-on: ubuntu-latest steps: @@ -37,30 +41,20 @@ jobs: - name: Running coverage run: yarn coverage:ci - - name: Coverage created? - id: check_coverage - run: | - if [ -s $GITHUB_WORKSPACE/coverage/lcov.info ] ; then - echo "check_result=true" >> $GITHUB_OUTPUT - echo "lcov.info FILE exists and has a size greater than zero" - else - echo "check_result=false" >> $GITHUB_OUTPUT - echo "lcov.info does not exists or has size zero" - fi - - name: Report coverage - if: steps.check_coverage.outputs.check_result == 'true' - uses: romeovs/lcov-reporter-action@v0.3.1 + uses: adjisb/code-coverage-assistant@master with: - lcov-file: ./coverage/lcov.info + monorepo-base-path: "./packages" + exclude: "core" github-token: ${{ secrets.GITHUB_TOKEN }} + min_coverage: 90 + badge_path: "./badges" - - name: Enforce coverage - if: steps.check_coverage.outputs.check_result == 'true' - uses: VeryGoodOpenSource/very_good_coverage@v2 + - name: Deploy badges + uses: peaceiris/actions-gh-pages@v3 with: - path: ./coverage/lcov.info - min_coverage: 80 + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./badges deploy: runs-on: ubuntu-latest diff --git a/package.json b/package.json index 6e8d07cb73..daa10af2cd 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "deploy": "nx run-many --target=deploy", "all": "nx run-many --all --parallel --targets=lint,format,test,deploy && nx run-many --all --targets=coverage", "test:ci": "nx affected --target=test --parallel=1", - "coverage:ci": "nx affected --target=coverage --parallel=1 && istanbul-combine -r lcov -r html 'packages/*/coverage.json'", + "coverage:ci": "nx affected --target=coverage --parallel=1", "lint:ci": "nx affected --target=lint", "format:ci": "nx affected --target=format", "deploy:ci": "nx affected --target=deploy --parallel=1", diff --git a/packages/core/package.json b/packages/core/package.json index 785af7d391..149c2a9f4b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -10,7 +10,8 @@ "keywords": [ "ethereum", "smart-contracts", - "The Sandbox" + "The Sandbox", + "matic" ], "resolutions": { "websocket": "1.0.32" diff --git a/packages/example-hardhat/package.json b/packages/example-hardhat/package.json index c32ff2bec8..6c0702f185 100644 --- a/packages/example-hardhat/package.json +++ b/packages/example-hardhat/package.json @@ -54,5 +54,11 @@ "ts-node": "^10.9.1", "typechain": "^8.2.0", "typescript": "5.0.4" - } + }, + "keywords": [ + "ethereum", + "polygon", + "smart-contracts", + "The Sandbox" + ] }