Skip to content

chore(CI): create workflow for assembling and testing #1

chore(CI): create workflow for assembling and testing

chore(CI): create workflow for assembling and testing #1

Workflow file for this run

name: (CI) - Building and testing the project
on:
workflow_dispatch:
push:
branches: [ main, CHR8486 ]
pull_request:
types: [ opened, synchronize, reopened, closed, edited ]
branches: [ main, CHR8486 ]
jobs:
assemble:
runs-on: ubuntu-latest
env:
GITHUB_LOGIN: ${{ github.actor }}
GITHUB_PACKAGES: ${{ secrets.GITHUB_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: This step creates a copy of the repository for the workflow to run on
uses: actions/checkout@v3
- name: This step sets up java on the machine running this workflow
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '16'
- name: Assembling the gradle project
run: |
chmod +x gradlew
./gradlew assemble
test:
runs-on: ubuntu-latest
needs: assemble
env:
GITHUB_LOGIN: ${{ github.actor }}
GITHUB_PACKAGES: ${{ secrets.GITHUB_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: This step creates a copy of the repository for the workflow to run on
uses: actions/checkout@v3
- name: This step sets up java on the machine running this workflow
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '16'
- name: Testing the gradle project.
run: |
chmod +x gradlew
./gradlew test