File: pull_request_server.yml

package info (click to toggle)
openrefine 3.9.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,440 kB
  • sloc: javascript: 106,758; java: 91,946; xml: 6,634; sh: 614; makefile: 78; python: 71; sql: 59
file content (198 lines) | stat: -rw-r--r-- 6,108 bytes parent folder | download
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
name: server CI

on:
  pull_request:
    paths:
      - '.github/workflows/pull_request_server.yml'
      - 'benchmark/**'
      - 'conf/**'
      - 'extensions/database/src/**'
      - 'extensions/database/tests/**'
      - 'extensions/database/pom.xml'
      - 'extensions/jython/src/**'
      - 'extensions/jython/tests/**'
      - 'extensions/jython/pom.xml'
      - 'extensions/sample/src/**'
      - 'extensions/sample/pom.xml'
      - 'extensions/pc-axis/src/**'
      - 'extensions/pc-axis/pom.xml'
      - 'extensions/phonetic/src/**'
      - 'extensions/phonetic/tests/**'
      - 'extensions/phonetic/pom.xml'
      - 'extensions/wikibase/src/**'
      - 'extensions/wikibase/tests/**'
      - 'extensions/wikibase/pom.xml'
      - 'extensions/pom.xml'
      - 'graphics/**'
      - 'main/resources/**'
      - 'main/src/**'
      - 'main/tests/data/**'
      - 'main/tests/server/**'
      - 'main/pom.xml'
      - 'modules/**'
      - 'packaging/**'
      - 'server/**'
      - 'pom.xml'
      - 'refine'
      - 'refine.bat'
      - 'refine.ini'
    branches:
      - master
      - '4.0'

permissions: read-all

jobs:
  linux_server_tests:
    strategy:
      matrix:
        java: [ 21 ]

    runs-on: ubuntu-latest

    services:
      postgres:
        image: postgres
        ports:
          - 5432
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: 'postgres'
          POSTGRES_DB: test_db
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
      mysql:
        image: mysql:8
        ports:
          - 3306
        env:
          MYSQL_ROOT_PASSWORD: root
        options: >-
          --health-cmd "mysqladmin ping"
          --health-interval 5s
          --health-timeout 2s
          --health-retries 3

    steps:
      - name: Set up secrets
        run: |
          echo "COVERALLS_TOKEN=$(echo eUVUVGRHOFJhQm9GMFJBYTNibjVhcWFEblpac1lmMlE3Cg== | base64 -d)" >> $GITHUB_ENV

      - uses: actions/checkout@v5

      - name: Set up Java ${{ matrix.java }}
        uses: actions/setup-java@v5
        with:
          distribution: 'temurin'
          java-version: ${{ matrix.java }}
          cache: 'maven'

      - name: Check Java linting
        id: java_linting
        run: |
          mvn -T 4 -B compile test-compile formatter:validate impsort:check javadoc:javadoc -Ddoclint=html,syntax,accessibility,reference

      - name: Configure connections to databases
        id: configure_db_connections
        run: cat extensions/database/tests/conf/github_actions_tests.xml | sed -e "s/MYSQL_PORT/${{ job.services.mysql.ports[3306] }}/g" | sed -e "s/POSTGRES_PORT/${{ job.services.postgres.ports[5432] }}/g" > extensions/database/tests/conf/tests.xml

      - name: Populate databases with test data
        id: populate_databases_with_test_data
        run: |
          mysql -u root -h 127.0.0.1 -P ${{ job.services.mysql.ports[3306] }} -proot -e 'CREATE DATABASE test_db;'
          mysql -u root -h 127.0.0.1 -P ${{ job.services.mysql.ports[3306] }} -proot < extensions/database/tests/conf/test-mysql.sql
          psql -U postgres test_db -h 127.0.0.1 -p ${{ job.services.postgres.ports[5432] }} < extensions/database/tests/conf/test-pgsql.sql
        env:
          PGPASSWORD: postgres

      - name: Build and test with Maven
        run: mvn -T 4 -B jacoco:prepare-agent test jacoco:report

      - name: Coveralls main
        uses: coverallsapp/github-action@v2
        with:
          base-path: main/src
          files: main/target/site/jacoco/jacoco.xml
          format: jacoco
          flag-name: Java-${{ matrix.java }}-main
          fail-on-error: false
          parallel: true

      - name: Coveralls database
        uses: coverallsapp/github-action@v2
        with:
          base-path: extensions/database/src
          files: extensions/database/target/site/jacoco/jacoco.xml
          github-token: ${{ env.COVERALLS_TOKEN }}
          format: jacoco
          flag-name: Java-${{ matrix.java }}-database
          fail-on-error: false
          parallel: true

      - name: Coveralls phonetic
        uses: coverallsapp/github-action@v2
        with:
          base-path: extensions/phonetic/src
          files: extensions/phonetic/target/site/jacoco/jacoco.xml
          github-token: ${{ env.COVERALLS_TOKEN }}
          format: jacoco
          flag-name: Java-${{ matrix.java }}-phonetic
          fail-on-error: false
          parallel: true

      - name: Coveralls wikibase
        uses: coverallsapp/github-action@v2
        with:
          base-path: extensions/wikibase/src
          files: extensions/wikibase/target/site/jacoco/jacoco.xml
          github-token: ${{ env.COVERALLS_TOKEN }}
          format: jacoco
          flag-name: Java-${{ matrix.java }}-wikibase
          fail-on-error: false
          parallel: true

      - name: Coveralls jython
        uses: coverallsapp/github-action@v2
        with:
          base-path: extensions/jython/src
          files: extensions/jython/target/site/jacoco/jacoco.xml
          github-token: ${{ env.COVERALLS_TOKEN }}
          format: jacoco
          flag-name: Java-${{ matrix.java }}-jython
          fail-on-error: false
          parallel: true

  windows_server_tests:
    runs-on: windows-latest

    steps:
      - uses: actions/checkout@v5

      - name: Set up Java 21
        uses: actions/setup-java@v5
        with:
          distribution: 'temurin'
          java-version: 21
          cache: 'maven'

      - name: Check Java linting
        id: java_linting
        run: |
          mvn -B formatter:validate impsort:check

      - name: Build and test with Maven
        run: mvn -T 4 -B jacoco:prepare-agent test

  finish:
    needs: linux_server_tests
    if: ${{ always() }}
    runs-on: ubuntu-latest
    steps:
      # Only really needed if we're testing in separate jobs (e.g. multiple Java versions)
      - name: Close parallel build
        uses: coverallsapp/github-action@v2
        with:
          parallel-finished: true