-
Notifications
You must be signed in to change notification settings - Fork 14
134 lines (113 loc) · 4.34 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
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
name: LIPAS CI
on: [push]
env:
AUTH_KEY: ${{ vars.AUTH_KEY }}
ADMIN_PASSWORD: ${{ vars.ADMIN_PASSWORD }}
SMTP_HOST: ${{ vars.SMTP_HOST }}
SMTP_USER: ${{ vars.SMTP_USER }}
SMTP_FROM: ${{ vars.SMTP_FROM }}
SEARCH_HOST: ${{ vars.SEARCH_HOST }}
SEARCH_USER: ${{ vars.SEARCH_USER }}
SEARCH_PASS: ${{ vars.SEARCH_PASS}}
ES_JAVA_OPTS: ${{ vars.ES_JAVA_OPTS }}
DB_NAME: ${{ vars.DB_NAME }}
DB_HOST: ${{ vars.DB_HOST }}
DB_PORT: ${{ vars.DB_PORT }}
DB_SUPERUSER: ${{ vars.DB_SUPERUSER }}
DB_SUPERUSER_PASSWORD: ${{ vars.DB_SUPERUSER_PASSWORD }}
DB_USER: ${{ vars.DB_USER }}
DB_PASSWORD: ${{ vars.DB_PASSWORD }}
MML_AUTH: ${{ vars.MML_AUTH }}
OLD_LIPAS_URL: ${{ vars.OLD_LIPAS_URL }}
OLD_LIPAS_USER: ${{ vars.OLD_LIPAS_USER }}
OLD_LIPAS_PASS: ${{ vars.OLD_LIPAS_PASS }}
ACCESSIBILITY_REGISTER_BASE_URL: ${{ vars.ACCESSIBILITY_REGISTER_BASE_URL }}
ACCESSIBILITY_REGISTER_SYSTEM_ID: ${{ vars.ACCESSIBILITY_REGISTER_SYSTEM_ID }}
ACCESSIBILITY_REGISTER_SECRET_KEY: ${{ vars.ACCESSIBILITY_REGISTER_SECRET_KEY }}
LEGACY_DB_URL: ${{ vars.LEGACY_DB_URL }}
LEGACY_DB_USER: ${{ vars.LEGACY_DB_USER }}
LEGACY_DB_PASS: ${{ vars.LEGACY_DB_PASS }}
GEOSERVER_ADMIN_USER: ${{ vars.GEOSERVER_ADMIN_USER }}
GEOSERVER_ADMIN_PASSWORD: ${{ vars.GEOSERVER_ADMIN_PASSWORD }}
GEOSERVER_INITIAL_MEMORY: ${{ vars.GEOSERVER_INITIAL_MEMORY }}
GEOSERVER_MAX_MEMORY: ${{ vars.GEOSERVER_MAX_MEMORY}}
OSRM_CAR_URL: ${{ vars.OSRM_CAR_URL }}
OSRM_BICYCLE_URL: ${{ vars.OSRM_BICYCLE_URL }}
OSRM_FOOT_URL: ${{ vars.OSRM_FOOT_URL }}
MAILCHIMP_CAMPAIGN_FOLDER_ID: ${{ vars.MAILCHIMP_CAMPAIGN_FOLDER_ID }}
MAILCHIMP_LIST_ID: ${{ vars.MAILCHIMP_LIST_ID }}
MAILCHIMP_NEWSLETTER_INTEREST_ID: ${{ vars.MAILCHIMP_NEWSLETTER_INTEREST_ID }}
MAILCHIMP_API_URL: ${{ vars.MAILCHIMP_API_URL }}
MAILCHIMP_API_KEY: ${{ vars.MAILCHIMP_API_KEY }}
DIGITRANSIT_SUBSCRIPTION_KEY: ${{ vars.DIGITRANSIT_SUBSCRIPTION_KEY }}
MML_COVERAGE_URL: ${{ vars.MML_COVERAGE_URL }}
MML_API_KEY: ${{ vars.MML_API_KEY }}
LEIN_SILENT: true
# lol
jobs:
ci:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@11.0
with:
# cli: latest
lein: latest
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
# key: cljdeps-${{ hashFiles('deps.edn') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
key: cljdeps-${{ hashFiles('webapp/project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
cache-dependency-path: webapp/package-lock.json
- name: Run backend tests
run: docker-compose run --rm backend-tests
- name: Build backend jar
run: docker-compose run --rm backend-build
- name: Build frontend
run: |
npm install --quiet
npx shadow-cljs release app
working-directory: ./webapp
# - name: Install npm dependencies
# run: docker-compose run --rm frontend-npm-deps
# - name: Build frontend
# run: docker-compose run --rm frontend-build
# - name: Run backend migrations
# run: docker-compose run --rm backend-migrate
# - name: Seed backend data to db
# run: docker-compose run --rm backend-seed
# - name: Index backend data to ES
# run: docker-compose run --rm backend-index-search
# - name: Generate self-sigend SSL-certificate
# run: |
# openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \
# -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
# -keyout certs/server.key -out certs/server.crt
# - name: Run integration tests
# run: docker-compose run --rm integration-tests
- name: docker logs
if: ${{ failure() }}
run: docker-compose logs