Skip to content

Commit

Permalink
Try checking out the examples repo directly
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanaem committed Jan 10, 2025
1 parent 577b742 commit 983055b
Showing 1 changed file with 10 additions and 43 deletions.
53 changes: 10 additions & 43 deletions .github/workflows/updated_examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,28 @@ on:
jobs:
e2e-test:
runs-on: ubuntu-latest
needs: e2e-test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Set up node env
uses: actions/setup-node@v4
with:
node-version: 20

- name: Create .env file
run: |
echo -e "NB_API_QUERY_URL=https://federate.neurobagel.org/\nNB_ENABLE_AUTH=true\nNB_QUERY_CLIENT_ID=mockclientid" > .env
- name: build
run: npm install && npm run build

- name: Run end to end tests
uses: cypress-io/github-action@v6
with:
wait-on: http://localhost:5173
start: npm run preview
spec: cypress/e2e/UpdateExamples.cy.ts
component: false

- name: Upload test artifacts
uses: actions/upload-artifact@v3
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
name: e2e-test-results
path: cypress/downloads/*
app-id: ${{ vars.NB_BOT_ID }}
private-key: ${{ secrets.NB_BOT_KEY }}

update-query-tool-results:
runs-on: ubuntu-latest
needs: e2e-test
steps:
- name: Checkout
- name: Checkout neurobagel_examples repository
uses: actions/checkout@v4
with:
submodules: true
submodules_recursive: true
repository: neurobagel/neurobagel_examples
path: neurobagel_examples
token: ${{ steps.generate-token.outputs.token }}

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: e2e-test-results
path: neurobagel_examples/query-tool-results

- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.NB_BOT_ID }}
private-key: ${{ secrets.NB_BOT_KEY }}

- name: Check for changes and commit if there are any
run: |
git config --global user.name "neurobagel bot"
Expand Down

0 comments on commit 983055b

Please sign in to comment.