diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e738e7..a94cbdb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -217,6 +217,36 @@ jobs: with: verbose: true + lighthouse-test: + name: Tests / Lighthouse CI + runs-on: ubuntu-latest + needs: + - compile + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: "lts/*" # latest lts + check-latest: true + cache: "yarn" + - uses: ./.github/gradle-action + - run: ./gradlew classes + - run: yarn install + - name: Run Lighthouse CI + run: | + npx lhci collect + npx lhci assert + - name: Upload Lighthouse CI results + uses: actions/upload-artifact@v4 + if: always() + with: + name: lighthouse-ci-results-${{ github.run_id }}-${{ github.sha }} + path: .lighthouseci/ + retention-days: 30 + test-docker-image: name: Tests / docker image runs-on: ubuntu-latest @@ -279,6 +309,7 @@ jobs: if: ${{ github.event_name == 'pull_request' }} needs: - test + - lighthouse-test - test-docker-image - dependency-review steps: @@ -290,6 +321,7 @@ jobs: runs-on: ubuntu-latest needs: - test + - lighthouse-test - test-docker-image # This job also has an output that can be used by downstream jobs. # https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml deleted file mode 100644 index f82dd42..0000000 --- a/.github/workflows/lighthouse.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -# DO NOT EDIT: this file is automatically synced from the template repository -# in https://github.com/Liber-UFPE/project-starter. -name: Lighthouse CI - -# yamllint disable rule:truthy -on: - push: - branches: [ "main" ] - pull_request: - types: [ "opened", "synchronize", "reopened" ] -# yamllint enable rule:truthy - -env: - GRADLE_OPTS: > - -Dorg.gradle.console=plain - -Dorg.gradle.caching=true - -Dsonar.gradle.skipCompile=true - -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"' - -jobs: - lighthouse-ci: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - run: corepack enable - - uses: actions/setup-node@v4 - with: - node-version: "lts/*" # latest lts - check-latest: true - cache: "yarn" - - uses: ./.github/gradle-action - - run: ./gradlew classes - - run: yarn install - - name: Run Lighthouse CI - run: | - npx lhci collect - npx lhci assert - - name: Upload Lighthouse CI results - uses: actions/upload-artifact@v4 - if: always() - with: - name: lighthouse-ci-results-${{ github.run_id }}-${{ github.sha }} - path: .lighthouseci/ - retention-days: 30 \ No newline at end of file