Skip to content

Commit

Permalink
Merge pull request #229 from pascalgrimaud/ci-separate-codecov
Browse files Browse the repository at this point in the history
CI: separate codecov to another job
  • Loading branch information
pascalgrimaud authored Nov 22, 2021
2 parents ba276f9 + a1555f0 commit eee47ec
Showing 1 changed file with 35 additions and 12 deletions.
47 changes: 35 additions & 12 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: build
on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
pipeline:
name: jhlight pipeline
tests:
name: tests
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]')"
timeout-minutes: 40
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: 'Setup: checkout project'
uses: actions/checkout@v2
- name: 'Setup: Node.js'
uses: actions/setup-node@v2.4.1
with:
node-version: 16.13.0
- name: 'Setup: update npm'
run: npm install -g npm
- name: 'Setup: Java'
- name: 'Setup: Java 17'
uses: actions/setup-java@v2
with:
distribution: 'temurin'
Expand All @@ -39,9 +45,26 @@ jobs:
run: |
chmod +x mvnw
./mvnw clean verify
- uses: codecov/codecov-action@v2
- name: 'Artifact: upload JaCoCo report'
uses: actions/upload-artifact@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./target/jacoco/jacoco.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (
name: jacoco
path: '${{ github.workspace }}/target/jacoco/jacoco.xml'
retention-days: 1
codecov:
needs: tests
name: codecov
runs-on: ubuntu-latest
steps:
- name: 'Setup: checkout project'
uses: actions/checkout@v2
- name: 'Artifact: download JaCoCo report'
uses: actions/download-artifact@v2
with:
name: jacoco
- name: 'Codecov: sending analyzis...'
uses: codecov/codecov-action@v2
with:
files: jacoco.xml
fail_ci_if_error: true
verbose: true

0 comments on commit eee47ec

Please sign in to comment.