Merge branch 'main' into james-add-discussion-failed #345
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |