Skip to content

Commit

Permalink
chore: nightly failing to set up cypress (#2378)
Browse files Browse the repository at this point in the history
The verify workflow should run on tags, so that a corresponding branch is created
in the d2-ci repository

Do not run the release step on PRs, but do allow it for pushes

yarn cypress install sometimes fails. Turns out it isn't necessary anyway
since the cypress-io gh action takes care of installing cypress.
  • Loading branch information
jenniferarnesen authored and janhenrikoverland committed Jun 12, 2023
1 parent 334ede5 commit f89b565
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
branches:
- 'master'
- 'dev'
tags:
- '*'

env:
GIT_AUTHOR_NAME: '@dhis2-bot'
Expand Down Expand Up @@ -94,9 +96,6 @@ jobs:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install Cypress binary
run: yarn cypress install

- name: End-to-End tests
uses: cypress-io/github-action@v2
with:
Expand Down Expand Up @@ -127,7 +126,7 @@ jobs:
if: |
!github.event.push.repository.fork &&
github.actor != 'dependabot[bot]' &&
github.ref == 'refs/heads/master'
github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
with:
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: 'dhis2: nightly'
on:
schedule:
- cron: '10 5 * * 1-5'
workflow_dispatch:

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
Expand All @@ -28,14 +29,8 @@ jobs:
with:
node-version: 18.x

- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install Cypress binary
run: yarn cypress install
- name: Install
run: yarn install --frozen-lockfile

- name: End-to-End tests
uses: cypress-io/github-action@v2
Expand All @@ -45,13 +40,11 @@ jobs:
start: ${{ env.SERVER_START_CMD }}
wait-on: ${{ env.SERVER_URL }}
wait-on-timeout: 300
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
group: 'e2e'
tag: ${{ github.event_name }}
env:
CI: true
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
SERVER_START_CMD: 'yarn cypress:start'
SERVER_URL: 'http://localhost:3000'
cypress_dhis2_api_stub_mode: 'DISABLED'
Expand Down

0 comments on commit f89b565

Please sign in to comment.