Skip to content

Commit

Permalink
ci: npm cache and cypress action (#897)
Browse files Browse the repository at this point in the history
* npm cache and cypress action

* chore: changelog
  • Loading branch information
krpeacock authored Jun 21, 2024
1 parent 10a0950 commit 01fab14
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
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

0 comments on commit 01fab14

Please sign in to comment.