-
Notifications
You must be signed in to change notification settings - Fork 9
90 lines (71 loc) · 2.12 KB
/
ci.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
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
name: CI
on:
pull_request:
branches:
- "*"
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./neo4j-datasource-plugin
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
cache-dependency-path: "./neo4j-datasource-plugin/package-lock.json"
- name: Install dependencies
run: npm ci
- name: Check types
run: npm run typecheck
- name: Lint
run: npm run lint
- name: Unit tests
run: npm run test:ci
- name: Build frontend
run: npm run build
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Go Flags
run: export GOFLAGS=-buildvcs=false
- name: Build backend
uses: magefile/mage-action@v2
with:
version: latest
args: buildAll
workdir: ./neo4j-datasource-plugin
- name: Start Neo4J with docker-compose
run: docker-compose -f ../docker-compose.dev.yaml up -d neo4j neo4j-provisioning
- name: Show docker container
run: docker ps
- name: Wait for provisioning
shell: bash
run: while docker ps | grep "provisioning" > /dev/null; do sleep 1; echo "still provisioning..."; done
- name: Show docker container
run: docker ps
- name: Test backend
uses: magefile/mage-action@v2
with:
version: latest
args: coverage
workdir: ./neo4j-datasource-plugin
# - name: Run e2e tests
# run: npm run e2e
# - name: Archive E2E output
# uses: actions/upload-artifact@v3
# if: steps.run-e2e-tests.outcome != 'success'
# with:
# name: cypress-videos
# path: cypress/videos
# retention-days: 5
# workdir: ./neo4j-datasource-plugin
- name: Stop Neo4J with docker-compose
run: docker-compose -f ../docker-compose.dev.yaml down -v