From 86c8a680403af9ee5eb9dc52ae06206bd8b47f08 Mon Sep 17 00:00:00 2001 From: tommy stendahl Date: Tue, 7 Nov 2023 16:35:48 +0100 Subject: [PATCH] Update test workflow - Set minimum permisions - Update versions of actions --- .github/workflows/test.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f400c70..26a6ad4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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') }} @@ -25,14 +27,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-ut-${{ hashFiles('**/pom.xml') }} @@ -40,7 +42,7 @@ jobs: - 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 @@ -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') }}