From 07bcd59873e5cd51bfdd016ae96143d49d29adaa Mon Sep 17 00:00:00 2001 From: J-T-McC Date: Mon, 10 Jun 2024 12:39:57 -0700 Subject: [PATCH] wip --- .github/workflows/run-tests.yml | 14 ++++++++++++-- jest.config.js | 1 + package.json | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f426845..0c112ac 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,11 +1,21 @@ name: Tests + on: [push] + jobs: - build: + test: runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 + - name: Install modules run: yarn + - name: Run tests - run: yarn test \ No newline at end of file + run: yarn test + + - name: Upload coverage to Coveralls + run: cat ./coverage/lcov.info | yarn coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index 3712882..f214ebe 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,6 +6,7 @@ module.exports = { testEnvironment: 'jsdom', setupFiles: ['jest-canvas-mock'], collectCoverage: true, + coverageDirectory: 'coverage', coverageReporters: ['lcov', 'text-summary'], moduleFileExtensions: ['vue', 'js', 'json', 'jsx', 'ts', 'tsx', 'node'] } diff --git a/package.json b/package.json index 50d62b9..dbc2af2 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "babel-jest": "^27.0.0", "chart.js": "^4.0", "chartjs-plugin-zoom": "^1.0.0-beta.5", - "coveralls": "^3.1.0", + "coveralls": "^3.1.1", "eslint": "^7.14.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-import": "^2.22.1",