api wiki alignment #43
This file contains hidden or 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
| # | |
| # Twitter Backend - Moo: Twitter Clone Application Backend by Scaler | |
| # Copyright © 2021-2026 Subhrodip Mohanta (hello@subho.xyz) | |
| # | |
| name: PR Checker | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| lint: | |
| name: Lint Check | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Microsoft JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'microsoft' | |
| java-version: '21' | |
| cache: 'maven' | |
| - name: Cache Maven Wrapper | |
| uses: actions/cache@v4 | |
| with: | |
| path: .mvn/wrapper | |
| key: ${{ runner.os }}-maven-wrapper-${{ hashFiles('**/maven-wrapper.properties') }} | |
| - name: Cache Spotless Index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.spotless | |
| key: ${{ runner.os }}-spotless-${{ hashFiles('**/pom.xml') }} | |
| - name: Run Spotless Check | |
| run: ./mvnw spotless:check | |
| test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Microsoft JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'microsoft' | |
| java-version: '21' | |
| cache: 'maven' | |
| - name: Cache Maven Wrapper | |
| uses: actions/cache@v4 | |
| with: | |
| path: .mvn/wrapper | |
| key: ${{ runner.os }}-maven-wrapper-${{ hashFiles('**/maven-wrapper.properties') }} | |
| - name: Run Maven Verify | |
| run: ./mvnw -B clean verify | |
| - name: Upload JAR artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pr-binary | |
| path: target/*.jar | |
| retention-days: 1 | |
| docker-smoke: | |
| name: Docker Smoke Test | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Download JAR artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pr-binary | |
| path: target/ | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Run Smoke Build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| push: false | |
| platforms: linux/amd64,linux/arm64 | |
| tags: pr-smoke:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |