Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Valen committed Jan 11, 2024
1 parent e75a64a commit 510911c
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,11 @@ jobs:
run: npm run build

- name: Test
run: npm run coverage
run: npm run test

upload-coverage:
name: Upload Coverage
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Download Coverage report
uses: actions/download-artifact@v3
- name: Upload Coverage Artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/

- name: Codecov Upload
uses: codecov/codecov-action@v3
with:
directory: coverage/
fail_ci_if_error: true
if-no-files-found: error
56 changes: 56 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Code Coverage

on:
push:
branches: ["master"]
pull_request:

jobs:
generate:
name: Generate Coverage
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"

- name: Generate Coverage Report
run: npm run coverage

- name: Upload Coverage Artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
if-no-files-found: error

upload:
name: Upload Coverage
needs: [generate]
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Download Coverage Artifact
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage/

- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
directory: coverage/
fail_ci_if_error: true

0 comments on commit 510911c

Please sign in to comment.