diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6ea5fbf..95472f7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,8 @@ name: tests on: [push, pull_request, workflow_dispatch] +permissions: read-all + jobs: code-analysis: runs-on: ubuntu-latest @@ -11,14 +13,14 @@ jobs: name: Java ${{ matrix.java }} code analysis steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v2 + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'adopt' java-version: ${{ matrix.java }} - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-m2-ca-${{ hashFiles('**/pom.xml') }} @@ -33,14 +35,14 @@ jobs: name: Java ${{ matrix.java }} unit test steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v2 + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'adopt' java-version: ${{ matrix.java }} - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-m2-ut-${{ hashFiles('**/pom.xml') }} @@ -48,7 +50,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@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: files: ./ecaudit/target/site/jacoco/jacoco.xml,./common/target/site/jacoco/jacoco.xml,./eclog/target/site/jacoco/jacoco.xml flags: unit-tests @@ -59,14 +61,14 @@ jobs: name: Java 11 target 11 unit test steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'adopt' java-version: '11' - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-m2-ut-${{ hashFiles('**/pom.xml') }} @@ -74,7 +76,7 @@ jobs: - name: Unit Tests run: mvn --batch-mode --activate-profiles github test jacoco:report -Dmaven.compiler.target=11 -Dmaven.compiler.source=11 - name: Upload test coverage report - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: files: ./ecaudit/target/site/jacoco/jacoco.xml,./common/target/site/jacoco/jacoco.xml,./eclog/target/site/jacoco/jacoco.xml flags: unit-tests @@ -88,14 +90,14 @@ jobs: name: Java ${{ matrix.java }} integration tests steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v2 + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'adopt' java-version: ${{ matrix.java }} - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-m2-it-${{ hashFiles('**/pom.xml') }} @@ -107,14 +109,14 @@ jobs: name: Java 11 target 11 integration tests steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'adopt' java-version: '11' - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-m2-it-${{ hashFiles('**/pom.xml') }}