Added graphql playground #6
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: CI Pipeline | |
on: | |
push: | |
branches: | |
- release | |
- development | |
pull_request: | |
branches: | |
- release | |
- development | |
- '*' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 22 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '22' | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build with Maven | |
run: mvn clean install -ntp | |
- name: Run tests | |
run: mvn test | |
deploy: | |
needs: build-and-test | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/release' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 22 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '22' | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Deploy to Production | |
run: echo "Deploying to production..." |