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

ci: npm cache and cypress action #897

Merged
merged 9 commits into from
Jun 21, 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
35 changes: 31 additions & 4 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,25 @@ jobs:
with:
node-version: ${{ matrix.node }}

- run: npm install -g npm

- run: npm install
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- run: npm ci
- run: npm run build -ws

# build monorepo incl. each subpackage
- run: npm run build --workspaces --if-present
Expand All @@ -46,11 +62,22 @@ jobs:
id: setup
run: npm run setup --workspaces --if-present

- run: npm run e2e --workspaces --if-present
- name: Node.js e2e tests
run: npm run e2e --workspace e2e/node
env:
CI: true
REPLICA_PORT: 4943

- name: Cypress e2e tests
uses: cypress-io/github-action@v6
with:
install: false
project: ./e2e/browser
start: |
npm run e2e --workspace e2e/node
wait-on: 'http://localhost:1234'
wait-on-timeout: 120

aggregate:
name: e2e:required
if: ${{ always() }}
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Changed

- ci: using cypress github action for e2e tests

## [1.4.0] - 2024-06-17

### Added
Expand Down
2 changes: 1 addition & 1 deletion e2e/node/basic/mainnet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('certified query', () => {
},
]
`);
});
}, 30_000);
});

describe('controllers', () => {
Expand Down
Loading