From bc034c78664774fb11956f958db6fffab6b8dd44 Mon Sep 17 00:00:00 2001 From: tokebe <43009413+tokebe@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:49:16 -0400 Subject: [PATCH] ci: update github actions workflows --- .github/workflows/test-cov.yml | 40 ++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 26 ---------------------- 2 files changed, 40 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/test-cov.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test-cov.yml b/.github/workflows/test-cov.yml new file mode 100644 index 0000000..c6b02fc --- /dev/null +++ b/.github/workflows/test-cov.yml @@ -0,0 +1,40 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Test + +on: ["push", "pull_request"] + +jobs: + build: + name: Generate coverage report + runs-on: ubuntu-latest + steps: + + - name: Get branch name + id: branch-name + uses: tj-actions/branch-names@v6 + + - uses: actions/checkout@v3 + with: + repository: biothings/biothings_explorer + + - name: Use Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Use pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - run: pnpm ci + - run: pnpm test-cov + + - name: Send coverage report to codecov for visualization + uses: codecov/codecov-action@v3 + with: + # working-directory: ./packages/@biothings-explorer/bte-trapi + files: ./coverage/lcov.info + verbose: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index c9aeb43..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,26 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Test - -on: ["push", "pull_request"] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm test