From 5acc7e6dde673d72141d24b8ab06a515b63a0c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Sat, 10 Aug 2024 15:39:42 +0100 Subject: [PATCH] Updates Lara-JS workflow to use Gradle instead of Ant --- .github/workflows/ant-lara-js.yml | 60 +++++++++++++++---------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ant-lara-js.yml b/.github/workflows/ant-lara-js.yml index d36e81d..81d5871 100644 --- a/.github/workflows/ant-lara-js.yml +++ b/.github/workflows/ant-lara-js.yml @@ -21,49 +21,45 @@ jobs: runs-on: ubuntu-latest - #defaults: - # run: - # working-directory: ./.. - steps: - uses: actions/checkout@v4 # Because of scheduled runs, by default run on default branch with: ref: ts-conversion + path: workspace/jsweaver - - name: Cache ivy dependencies - id: cache-nivy - uses: actions/cache@v3 - env: - cache-name: cache-ivy-dependencies - with: - # ivy dependencies cache files are stored in `~/.ivy2` on Linux/macOS - path: ~/.ivy2 - key: ${{ runner.os }}-build-${{ env.cache-name }} - - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - - name: Generate build.xml - run: | - wget -q -N http://specs.fe.up.pt/tools/eclipse-build.jar - java -jar eclipse-build.jar https://github.com/specs-feup/specs-java-libs https://github.com/specs-feup/lara-framework?commit=feature/lara-js ./ - wget -N -O /usr/share/ant/lib/ivy-2.5.0.jar specs.fe.up.pt/libs/ivy-2.5.0.jar - - name: Build with Ant - run: | - ant -noinput -buildfile build.xml + - name: Check out specs-java-libs repo + uses: actions/checkout@v4 + with: + repository: specs-feup/specs-java-libs + path: workspace/specs-java-libs + + - name: Check out lara-framework repo + uses: actions/checkout@v4 + with: + repository: specs-feup/lara-framework + ref: feature/lara-js + path: workspace/lara-framework + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + + # Setting up gradle multi-project would be helpful + - name: Build and Test Jackdaw + working-directory: workspace/jsweaver/jsweaver + run: gradle build test - - name: List directory - run: | - echo "Current folder" - ls - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3.6.1 - if: always() # always run even if the previous step fails + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: always() with: - report_paths: '**/reports-eclipse-build/TEST-*.xml' + report_paths: 'workspace/jsweaver/**/build/test-results/test/TEST-*.xml' summary: true - #exclude_sources: ''