-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (46 loc) · 1.44 KB
/
backend-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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: codebuild-loculus-ci-${{ github.run_id }}-${{ github.run_attempt }}
timeout-minutes: 15
env:
CROSSREF_USERNAME: ${{ secrets.CROSSREF_USERNAME }}
CROSSREF_TEST_PASSWORD: ${{ secrets.CROSSREF_TEST_PASSWORD }}
CROSSREF_TEST_ENDPOINT: ${{ secrets.CROSSREF_TEST_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@v3
- 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