From c9373fac85ab375bfe154242c43ecaa8686a1674 Mon Sep 17 00:00:00 2001 From: Foivos Date: Wed, 15 May 2024 12:15:41 +0300 Subject: [PATCH] add coverage --- .github/workflows/codecov.yaml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/codecov.yaml diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml new file mode 100644 index 00000000..eac1206f --- /dev/null +++ b/.github/workflows/codecov.yaml @@ -0,0 +1,43 @@ +name: Code Coverage +on: pull_request + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: blacksmith-16vcpu-ubuntu-2204 + + steps: + - name: Setup Dependencies for Sui Binary + run: sudo apt-get update && sudo apt-get install -y libpq-dev + + - name: Download and Install Sui + env: + SUI_VERSION: devnet-v1.24.0 + run: | + wget https://github.com/MystenLabs/sui/releases/download/${SUI_VERSION}/sui-${SUI_VERSION}-ubuntu-x86_64.tgz + tar -xvf sui-${SUI_VERSION}-ubuntu-x86_64.tgz + sudo mv ./target/release/sui-test-validator-ubuntu-x86_64 /usr/local/bin/sui-test-validator + sudo mv ./target/release/sui-ubuntu-x86_64 /usr/local/bin/sui + rm -rf sui-${SUI_VERSION}-ubuntu-x86_64.tgz + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Test + timeout-minutes: 60 + run: npm run test --coverage