Skip to content

43 events gallery of photos #600

43 events gallery of photos

43 events gallery of photos #600

Workflow file for this run

name: CI
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
env:
JAVA_VERSION: 17
JAVA_DISTRIBUTION: temurin
GRADLE_VERSION: 7.5
jobs:
lint:
name: 'Lint'
runs-on: ubuntu-latest
steps:
- name: Fetch sources
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: ${{ env.GRADLE_VERSION }}
- name: Run linter
run: ./gradlew ktlintCheck
- name: Upload ktlint report
uses: actions/upload-artifact@v3
with:
name: lint-reports
path: build/reports/ktlint
if: always()
test:
name: 'Test'
needs: lint
runs-on: ubuntu-latest
steps:
- name: Fetch sources
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: ${{ env.GRADLE_VERSION }}
- name: Run test suite
run: ./gradlew test
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3
- name: Upload test reports
uses: actions/upload-artifact@v3
with:
name: test-reports
path: |
build/reports/tests/test
build/reports/jacoco/test
if: always()
docs:
name: 'Docs'
needs: test
runs-on: ubuntu-latest
permissions:
pull-requests: write
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
steps:
- name: Fetch sources
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: ${{ env.GRADLE_VERSION }}
- name: Generate documentation
run: ./gradlew generateDocs
- name: Generate redoc file
run: npx redoc-cli build docs/openapi3.json -o docs/index.html
- name: Deploy to netlify (main)
if: github.ref == 'refs/heads/main'
run: |
npx netlify-cli deploy --dir=docs --prod
- name: Deploy to netlify (develop)
if: github.ref == 'refs/heads/develop'
run: |
npx netlify-cli deploy --dir=docs --alias develop
- name: Deploy to netlify (preview)
if: github.event_name == 'pull_request'
run: |
npx netlify-cli deploy --json --dir=docs > deployment_data
echo 'deploy_url='$(grep -oP '(?<="deploy_url": ")[^"]*' deployment_data) >> $GITHUB_ENV
- uses: mshick/add-pr-comment@v2
with:
message: |
Check the documentation preview: ${{ env.deploy_url }}
allow-repeats: true