aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: a7cd808d3ed1c09cba17285a8e3afb644d1c6269 (plain) (blame)
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
name: Juick

on:
  pull_request:
  push:
    branches: [master]

jobs:
  current:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    strategy:
      matrix:
        profile: [default, postgres, mysql, sqlserver]
    services:
      postgres:
        image: postgres
        ports:
          - 5432:5432
        env:
          POSTGRES_DB: juick
          POSTGRES_USER: juick
          POSTGRES_PASSWORD: secret
        options: --health-cmd="pg_isready -U juick" --health-interval=10s --health-retries=3 --health-timeout=5s --health-start-period=15s
      mysql:
        image: mariadb
        ports:
          - 3306:3306
        env:
          MARIADB_DATABASE: juick
          MARIADB_ROOT_PASSWORD: secret
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-retries=3 --health-timeout=5s --health-start-period=15s
      sqlserver:
        image: mcr.microsoft.com/mssql/server:2022-latest
        ports:
          - 1433:1433
        options: --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P \"$MSSQL_SA_PASSWORD\" -Q \"SELECT 1\"" --health-interval=10s --health-retries=3 --health-timeout=5s --health-start-period=15s
        env:
          ACCEPT_EULA: Y
          MSSQL_SA_PASSWORD: Passw00rd!
          MSSQL_PID: Express
          MSSQL_COLLATION: Cyrillic_General_100_CI_AS_WS_SC_UTF8
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 17
        uses: actions/setup-java@v3
        with:
          distribution: "temurin"
          java-version: 17
          cache: "maven"
      - name: Setup Node.JS 18
        uses: actions/setup-node@v3
        with:
          node-version: "18"
          cache: "npm"
      - run: npm install
      - name: Run tests
        run: mvn -P${{ matrix.profile }} clean package
      - uses: mikepenz/action-junit-report@v2
        with:
          report_paths: "**/target/surefire-reports/TEST-*.xml"
          github_token: ${{ secrets.GITHUB_TOKEN }}
  vnext:
    defaults:
      run:
        working-directory: vnext
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Setup Node.JS 18
        uses: actions/setup-node@v3
        with:
          node-version: "18"
          cache: "npm"
      - run: npm ci
      - run: npm test
      - run: npm run lint
      - run: npm run build
      - run: npm run build:ssr