From b25ac61a8f00ed3eebf472f8058a60fed89b590a Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Fri, 12 Jul 2024 23:23:28 +0200 Subject: [PATCH] Filtering workflow by path --- .github/workflows/best-practice.yml | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/best-practice.yml b/.github/workflows/best-practice.yml index a9f484b8..4f6ac5af 100644 --- a/.github/workflows/best-practice.yml +++ b/.github/workflows/best-practice.yml @@ -6,24 +6,28 @@ on: workflow_dispatch: push: branches: [ main ] + paths: + - '**/best-practice/**' pull_request: + paths: + - '**/best-practice/**' jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [ ubuntu-latest ] steps: - - uses: actions/checkout@v2 - - name: Set up Java - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Run tests - continue-on-error: true - env: - SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} - SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} - SCREENER_API_KEY: ${{ secrets.SCREENER_API_KEY }} - run: mvn test -pl best-practice + - uses: actions/checkout@v2 + - name: Set up Java + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Run tests + continue-on-error: true + env: + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} + SCREENER_API_KEY: ${{ secrets.SCREENER_API_KEY }} + run: mvn test -pl best-practice