Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) Cache install dependencies step in e2e workflow #1235

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ jobs:
- name: 📦 Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: yarn install --immutable
working-directory: e2e_repo

- name: 🚀 Setup local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v3
Expand All @@ -164,33 +165,41 @@ jobs:
ref: main
path: e2e_repo

- name: 📄 Copy test environment variables
- name: 📄 Copy test environment variables for ${{ matrix.repo }}
run: cp example.env .env
working-directory: e2e_repo

- name: 📦 Install dependencies
- name: 💾 Cache dependencies for ${{ matrix.repo }}
id: cache-other-repo-dependencies
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('e2e_repo/**/yarn.lock') }}

- name: 📦 Install dependencies for ${{ matrix.repo }}
if: steps.cache-other-repo-dependencies.outputs.cache-hit != 'true'
run: yarn install --immutable
working-directory: e2e_repo

- name: 💾 Cache Playwright Browsers
- name: 💾 Cache Playwright Browsers for ${{ matrix.repo }}
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-playwright-${{ hashFiles('e2e_repo/**/yarn.lock') }}

- name: 🎭 Install Playwright Browsers
- name: 🎭 Install Playwright Browsers for ${{ matrix.repo }}
run: yarn playwright install --with-deps
working-directory: e2e_repo

- name: ⏳ Wait for the OpenMRS instance to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/openmrs/login.htm)" != "200" ]]; do sleep 10; done

- name: 🧪 Run E2E tests
- name: 🧪 Run E2E tests for ${{ matrix.repo }}
run: yarn playwright test
working-directory: e2e_repo

- name: 📤 Upload Report
- name: 📤 Upload Report for ${{ matrix.repo }}
uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/esm-framework/docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2855,7 +2855,7 @@ To cancel the network request, simply call `subscription.unsubscribe();`

#### Defined in

[packages/framework/esm-api/src/openmrs-fetch.ts:263](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L263)
[packages/framework/esm-api/src/openmrs-fetch.ts:271](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L271)

___

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#### Defined in

[packages/framework/esm-api/src/openmrs-fetch.ts:328](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L328)
[packages/framework/esm-api/src/openmrs-fetch.ts:336](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L336)

___

Expand All @@ -31,4 +31,4 @@ ___

#### Defined in

[packages/framework/esm-api/src/openmrs-fetch.ts:329](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L329)
[packages/framework/esm-api/src/openmrs-fetch.ts:337](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L337)
Loading