From 5729bff436c447bf0ae338295c2f7df7af31b80d Mon Sep 17 00:00:00 2001 From: Kawaljeet Singh <49296873+justkawal@users.noreply.github.com> Date: Thu, 6 Oct 2022 18:03:32 +0530 Subject: [PATCH] Fix CI-CD temporarily without code-climate (#65) * optimize CI-CD * ref to main * temporarily ref to this branch to see if test cases work * tested in previous commit, now ref back to main * remove references from test-cases * remove absolute path * path to reuseable_workflow * add file extension --- .github/workflows/reuseable_workflow.yml | 25 ++++++------------------ .github/workflows/test.yml | 8 ++++---- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/.github/workflows/reuseable_workflow.yml b/.github/workflows/reuseable_workflow.yml index f6a6f6ad..bab4db58 100644 --- a/.github/workflows/reuseable_workflow.yml +++ b/.github/workflows/reuseable_workflow.yml @@ -18,15 +18,15 @@ jobs: run: working-directory: ${{ inputs.working-directory }} steps: - - name: Check out code - uses: actions/checkout@v3.1.0 + - name: Check out code (LFS) + uses: nschloe/action-cached-lfs-checkout@v1.1.2 # Get latest stable version of dart-lang - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d - name: Install dependencies run: dart pub get - + # Uncomment this step to verify the use of 'dart format' on each commit. - name: Verify formatting run: dart format --output=none --set-exit-if-changed . @@ -39,13 +39,13 @@ jobs: # package:test for this step to succeed. Note that Flutter projects will # want to change this to 'flutter test'. - name: Run tests - run: dart test + run: dart run test --coverage=./coverage - name: Activate coverage run: dart pub global activate coverage - - name: Run Code Coverage - run: dart pub global run coverage:test_with_coverage + - name: Create coverage + run: dart pub global run coverage:format_coverage --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage - name: Upload Code Coverage uses: codecov/codecov-action@v3 @@ -53,16 +53,3 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} flags: ${{ inputs.codecov-flag }} verbose: true] - - - name: Codeclimate - uses: actions/setup-node@master - with: - node-version: '12' - - run: npm install -g yarn - - run: yarn install - - run: yarn build - - uses: paambaati/codeclimate-action@v3.0.0 - env: - CC_TEST_REPORTER_ID: 945dfb58a832d233a3caeb84e3e6d3be212e8c7abcb48117fce63b9adcb43647 - with: - coverageCommand: yarn coverage \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1820bba..5577d1df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: ss58_codec: name: Test ss58_codec needs: [lints, markdown-link-check] - uses: rankanizer/polkadart/.github/workflows/reuseable_workflow.yml@feature/polkadart_scale_codec + uses: ./.github/workflows/reuseable_workflow.yml with: codecov-flag: "ss58_codec" working-directory: "./packages/ss58_codec" @@ -54,7 +54,7 @@ jobs: ss58: name: Test ss58 needs: [lints, markdown-link-check] - uses: rankanizer/polkadart/.github/workflows/reuseable_workflow.yml@feature/polkadart_scale_codec + uses: ./.github/workflows/reuseable_workflow.yml with: codecov-flag: "ss58" working-directory: "./packages/ss58" @@ -62,7 +62,7 @@ jobs: polkadart_scale_codec: name: Test polkadart_scale_codec needs: [lints, markdown-link-check] - uses: rankanizer/polkadart/.github/workflows/reuseable_workflow.yml@feature/polkadart_scale_codec + uses: ./.github/workflows/reuseable_workflow.yml with: codecov-flag: "polkadart_scale_codec" working-directory: "./packages/polkadart_scale_codec" @@ -70,7 +70,7 @@ jobs: polkadart: name: Test polkadart needs: [lints, markdown-link-check] - uses: rankanizer/polkadart/.github/workflows/reuseable_workflow.yml@feature/polkadart_scale_codec + uses: ./.github/workflows/reuseable_workflow.yml with: codecov-flag: "polkadart" working-directory: "./polkadart"