-
Notifications
You must be signed in to change notification settings - Fork 493
97 lines (83 loc) · 2.85 KB
/
CI.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI
on:
push:
branches: [ "4.4" ]
pull_request:
branches: [ "4.4" ]
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
TEAMCITY_FOUR_FOUR_URL: ${{ secrets.TEAMCITY_FOUR_FOUR_URL }}
TEAMCITY_USER: ${{ secrets.TEAMCITY_USER }}
TEAMCITY_PASSWORD: ${{ secrets.TEAMCITY_PASSWORD }}
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-jdk
- uses: ./.github/actions/setup-gradle-cache
- name: Compile
run: ./gradlew compileJava compileTestJava
code-ql:
runs-on: ubuntu-latest
needs: compile
# required by CodeQL
permissions:
security-events: write
actions: read
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-jdk
- uses: ./.github/actions/setup-gradle-cache
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: java
- name: Compile
run: ./gradlew compileJava compileTestJava
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
format-checks:
runs-on: ubuntu-latest
needs: compile
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-jdk
- uses: ./.github/actions/setup-gradle-cache
- name: Check all the files are properly formatted
run: ./gradlew spotlessCheck
license-checks:
runs-on: ubuntu-latest
needs: compile
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-jdk
- uses: ./.github/actions/setup-gradle-cache
- name: Check LICENSE and NOTICE files
run: ./gradlew validateLicenses generateLicensesFiles
tests:
strategy:
fail-fast: false
matrix:
project: ['core', 'full', 'processor', 'test-utils', 'core-it', 'full-it']
env:
DOCKER_ENTERPRISE_FOUR_FOUR_URL: ${{ secrets.DOCKER_ENTERPRISE_FOUR_FOUR_URL }}
DOCKER_COMMUNITY_FOUR_FOUR_URL: ${{ secrets.DOCKER_COMMUNITY_FOUR_FOUR_URL }}
ENTERPRISE_TAR: enterprise-docker.tar
COMMUNITY_TAR: community-docker.tar
runs-on: ubuntu-latest
needs: compile
steps:
- uses: actions/checkout@v3
- name: Download neo4j 4.4 docker container
if: matrix.project == 'core-it' || matrix.project == 'full-it' || matrix.project == 'core'
run: |
curl -s -L0 -u "${TEAMCITY_USER}:${TEAMCITY_PASSWORD}" -X GET ${DOCKER_ENTERPRISE_FOUR_FOUR_URL} -o ${ENTERPRISE_TAR} &
curl -s -L0 -u "${TEAMCITY_USER}:${TEAMCITY_PASSWORD}" -X GET ${DOCKER_COMMUNITY_FOUR_FOUR_URL} -o ${COMMUNITY_TAR} &
wait
docker load --input ${ENTERPRISE_TAR}
docker load --input ${COMMUNITY_TAR}
- name: Run ${{ matrix.project }} tests
uses: ./.github/actions/test-gradle-project
with:
project-name: ${{ matrix.project }}