Skip to content

Commit

Permalink
[ENH] Add version compatibility check for all latest builds (#37)
Browse files Browse the repository at this point in the history
* [ENH] Add a check for latest versions

* Add cron-job auto-runner
  • Loading branch information
surchs authored Apr 11, 2024
1 parent e3c9a35 commit b5cf9d8
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/compatibility-test copy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Check compatibility of latest

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '31 5,17 * * *'
workflow_dispatch:

jobs:
Neurobagel-latest:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Rename files
working-directory: ./dev
run: |
cp template.env .env
cp local_nb_nodes.template.json local_nb_nodes.json
- name: Run docker compose
working-directory: ./dev
run: |
docker compose --profile full_stack up -d
- name: Set up node env
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install cypress
run: npm install

- name: wait for graph set up
working-directory: ./dev
run: |
while ! tail -n 0 -f ./DEPLOY.log | grep -q "Finished setting up the Neurobagel graph backend."; do
:
done
echo "Finished setting up the Neurobagel graph backend."
- name: Run end to end tests
uses: cypress-io/github-action@v6
with:
wait-on: http://localhost:3000
component: false

- name: Latest broke, tell someone
if: ${{ failure() }}
run: |
curl -X POST -H 'Content-type: application/json' --data '{"text":"Neurobagel latest broke! Please check https://github.com/neurobagel/recipes/actions and resolve the incompatible versions!"}' ${{ secrets.NB_SLACK_WEBHOOK }}

0 comments on commit b5cf9d8

Please sign in to comment.