fix(backend,website): calculate status counts efficiently & request only aggregates for submission portal #1661
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: backend-tests | |
on: | |
pull_request: | |
paths: | |
- "backend/**" | |
- ".github/workflows/backend-tests.yml" | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-backend-tests | |
cancel-in-progress: true | |
jobs: | |
Tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
env: | |
CROSSREF_USERNAME: ${{ secrets.CROSSREF_USERNAME }} | |
CROSSREF_PASSWORD: ${{ secrets.CROSSREF_PASSWORD }} | |
CROSSREF_ENDPOINT: ${{ secrets.CROSSREF_ENDPOINT }} | |
CROSSREF_DOI_PREFIX: ${{ secrets.CROSSREF_DOI_PREFIX }} | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN_READ_PUBLIC }} | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "21" | |
distribution: "adopt" | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Execute Tests | |
uses: nick-fields/retry@v3 | |
with: | |
command: cd ./backend && ./gradlew test | |
max_attempts: 3 | |
timeout_minutes: 10 | |
retry_wait_seconds: 1 | |
- name: Check Format And Lint | |
run: ./gradlew ktlintCheck | |
working-directory: ./backend |