-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.25 KB
/
small_checks.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
name: Small Checks
on:
push:
jobs:
check-empirica-versions-match:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get empirica version used in server
run: echo "SERVER_EMPIRICA_VERSION=$(cat server/package.json | jq --raw-output '.dependencies."@empirica/core"')" >> $GITHUB_ENV
- name: Get empirica version used in client
run: echo "CLIENT_EMPIRICA_VERSION=$(cat client/package.json | jq --raw-output '.dependencies."@empirica/core"')" >> $GITHUB_ENV
- name: Check that empirica versions match
run: |
if [ "$SERVER_EMPIRICA_VERSION" != "$CLIENT_EMPIRICA_VERSION" ]; then
echo "Empirica versions do not match!"
echo "Server: $SERVER_EMPIRICA_VERSION"
echo "Client: $CLIENT_EMPIRICA_VERSION"
exit 1
fi
- name: Check that empirica version from server is found in two lines in the dockerfile
run: |
if [ "$(grep -c "build-v$SERVER_EMPIRICA_VERSION" Dockerfile)" != 2]; then
echo "Empirica version from server not found in Dockerfile!"
echo "Server: $SERVER_EMPIRICA_VERSION"
echo "Dockerfile: $(cat Dockerfile)"
exit 1
fi