From 5a7839e8bde11d80ab391e83ec2a1aa0939caeae Mon Sep 17 00:00:00 2001 From: yubrew Date: Sun, 24 Dec 2023 11:44:58 -0500 Subject: [PATCH 1/4] rm codecov --- .github/workflows/coverage.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e92cdef03..1a02800cd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -17,8 +17,3 @@ jobs: - name: Generate code coverage run: | cargo tarpaulin --verbose --workspace --timeout 120 --out Xml --avoid-cfg-tarpaulin - - name: Upload to codecov.io - uses: codecov/codecov-action@v2 - with: - token: ${{secrets.CODECOV_TOKEN}} - fail_ci_if_error: true From d882979901b6f05bb7370d804730067c9c60965c Mon Sep 17 00:00:00 2001 From: yubrew Date: Sun, 24 Dec 2023 11:45:26 -0500 Subject: [PATCH 2/4] add linting --- .github/workflows/linter.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 000000000..f23564ebf --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,28 @@ +--- + name: Lint + + on: # yamllint disable-line rule:truthy + push: null + pull_request: null + + jobs: + build: + name: Lint + runs-on: ubuntu-latest + + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Super-linter + uses: super-linter/super-linter@v5.7.2 # x-release-please-version + env: + DEFAULT_BRANCH: main + # To report GitHub Actions status checks + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From fa333af5ff1bf17d9d8c55072703655cbe9b9992 Mon Sep 17 00:00:00 2001 From: yubrew Date: Mon, 1 Jan 2024 21:34:42 -0500 Subject: [PATCH 3/4] just run linter script for testing, scoped to rust --- .github/workflows/coverage.yml | 19 ------- .github/workflows/e2e.yml | 94 ---------------------------------- .github/workflows/linter.yml | 8 ++- 3 files changed, 6 insertions(+), 115 deletions(-) delete mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 1a02800cd..000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: coverage - -on: - pull_request: - push: -jobs: - test: - name: coverage - runs-on: ubuntu-latest - container: - image: xd009642/tarpaulin:0.22.0 - options: --security-opt seccomp=unconfined - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Generate code coverage - run: | - cargo tarpaulin --verbose --workspace --timeout 120 --out Xml --avoid-cfg-tarpaulin diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index 8f514a7e9..000000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: E2E Integration Tests - -on: - pull_request: - push: - branches: - - main - -jobs: - test: - name: E2E tests - runs-on: ubuntu-latest - env: - GAS_OUT_DIR: gas_reports - ENABLE_MAX_COLLECTION: true - GAS_LIMIT: 75000000 - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Install latest toolchain - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - targets: wasm32-unknown-unknown - - - name: Rust Dependencies Cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - artifacts/ - key: ${{ runner.os }}-cargo-with-artifacts-${{ hashFiles('**/Cargo.lock') }} - - - name: Get mainnet GAS_LIMIT - run: echo "MAINNET_GAS_LIMIT=$(curl -s https://rpc.stargaze-apis.com/consensus_params | jq -r '.result.consensus_params.block.max_gas')" >> $GITHUB_ENV - - - name: Mainnet block GAS_LIMIT changed - if: ${{ env.MAINNET_GAS_LIMIT != env.GAS_LIMIT }} - uses: actions/github-script@v6 - with: - script: core.setFailed(`Integration tests must update GAS_LIMIT from ${process.env.GAS_LIMIT} to ${process.env.MAINNET_GAS_LIMIT}`) - - - name: Deploy local Stargaze node - run: make deploy-local - - - name: Optimize Contracts - run: make optimize - - - name: Run Integration Tests - run: make e2etest - - - name: Combine Test Gas Reports - run: cd e2e/ && jq -rs 'reduce .[] as $item ({}; . * $item)' gas_reports/*.json > gas_report.json - - - name: Raw Gas Report - run: cat e2e/gas_report.json - - - name: Set GIT_BRANCH - run: echo "GIT_BRANCH=$(echo ${{ github.ref }} | sed 's|/|-|g')" >> $GITHUB_ENV - - - name: Upload Gas Report - if: ${{ github.ref == 'refs/heads/main' }} - uses: actions/upload-artifact@v3 - with: - name: launchpad-gas-report-${{ env.GIT_BRANCH }} - path: e2e/gas_report.json - retention-days: 90 - - - name: Download main gas report - id: download_gas - # Because the max retention period of github artifacts is 90 days - # there's a possibility the main's report no longer exists - continue-on-error: true - if: ${{ github.ref != 'refs/heads/main' }} - # NOTE: We can't use github's `actions/download-artifact` because it doesnt support - # downloading an artifact cross workflows yet - # https://github.com/actions/download-artifact/issues/3 - uses: dawidd6/action-download-artifact@v2 - with: - branch: main - workflow: e2e.yml - name: launchpad-gas-report-refs-heads-main - - - name: Post gas diff to PR - if: ${{ github.ref != 'refs/heads/main' && steps.download_gas.outputs.found_artifact == 'true' }} - uses: de-husk/cosm-orc-gas-diff-action@v0.6.3 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - current_json: e2e/gas_report.json - old_json: gas_report.json diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index f23564ebf..b901ea27b 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -23,6 +23,10 @@ - name: Super-linter uses: super-linter/super-linter@v5.7.2 # x-release-please-version env: - DEFAULT_BRANCH: main # To report GitHub Actions status checks - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_RUST_CLIPPY: true + VALIDATE_RUST_2015: true + VALIDATE_RUST_2018: true + VALIDATE_RUST_2021: true + IGNORE_GENERATED_FILES: true \ No newline at end of file From e0efecd505f8b32f277d98ca3bc31a6cfbfcccf3 Mon Sep 17 00:00:00 2001 From: yubrew Date: Tue, 2 Jan 2024 16:57:12 -0500 Subject: [PATCH 4/4] only validate rust 2021 --- .github/workflows/linter.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index b901ea27b..58db38df7 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -26,7 +26,5 @@ # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_RUST_CLIPPY: true - VALIDATE_RUST_2015: true - VALIDATE_RUST_2018: true VALIDATE_RUST_2021: true IGNORE_GENERATED_FILES: true \ No newline at end of file