Skip to content

Commit

Permalink
Update test workflow
Browse files Browse the repository at this point in the history
- Set minimum permisions
- Update versions of actions
  • Loading branch information
tommystendahl committed Nov 7, 2023
1 parent cf6c314 commit 86c8a68
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ name: tests

on: [push, pull_request, workflow_dispatch]

permissions: read-all

jobs:
code-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '8'
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-ca-${{ hashFiles('**/pom.xml') }}
Expand All @@ -25,22 +27,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '8'
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-ut-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-ut-
- name: Unit Tests
run: mvn --batch-mode --activate-profiles github test jacoco:report
- name: Upload test coverage report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: ./ecaudit/target/site/jacoco/jacoco.xml,./common/target/site/jacoco/jacoco.xml,./eclog/target/site/jacoco/jacoco.xml
flags: unit-tests
Expand All @@ -50,14 +52,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '8'
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-it-${{ hashFiles('**/pom.xml') }}
Expand Down

0 comments on commit 86c8a68

Please sign in to comment.