Add commenting to BoardService #173
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: [pull_request] | |
jobs: | |
backend-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: "21" | |
distribution: "adopt" | |
- name: Cache Gradle packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Run backend tests | |
run: cd api && ./gradlew runTestsWithCoverage | |
frontend-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Cache Node.js modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node | |
- name: Install Dependencies | |
run: cd frontend && npm install | |
- name: Run frontend tests | |
run: cd frontend && npm run test | |
backend-build-and-deploy-multi-arch: | |
runs-on: ubuntu-latest # Use an Ubuntu runner | |
steps: | |
# Checkout the repository to access the Dockerfile and source code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Set up Docker Buildx (needed for multi-platform builds) | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
# Log in to DockerHub using secrets (replace with your DockerHub credentials) | |
- name: Log in to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: "fit3162" | |
password: 'Gzg[8s!xS=w"<W7;ag3A' | |
# Build and push the Docker image for multiple platforms (AMD64, ARM) | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./api # The root directory, assuming your Dockerfile is here | |
platforms: linux/amd64,linux/arm64 # Build for AMD64 and ARM64 | |
push: true # Push the image to DockerHub after building | |
tags: | | |
fit3162/backend:latest | |
fit3162/backend:${{ github.sha }} | |
frontend-build-and-deploy-multi-arch: | |
runs-on: ubuntu-latest # Use an Ubuntu runner | |
steps: | |
# Checkout the repository to access the Dockerfile and source code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Set up Docker Buildx (needed for multi-platform builds) | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
# Log in to DockerHub using secrets (replace with your DockerHub credentials) | |
- name: Log in to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: "fit3162" | |
password: 'Gzg[8s!xS=w"<W7;ag3A' | |
# Build and push the Docker image for multiple platforms (AMD64, ARM) | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./frontend # The root directory, assuming your Dockerfile is here | |
platforms: linux/amd64,linux/arm64 # Build for AMD64 and ARM64 | |
push: true # Push the image to DockerHub after building | |
tags: | | |
fit3162/frontend:latest | |
fit3162/frontend:${{ github.sha }} |