-
Notifications
You must be signed in to change notification settings - Fork 149
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
Update GitHub Actions workflows with .nvmrc
#610
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5eb8510
Allow Node.js LTS ‘Fermium’ (v14) releases
rgarner 16e8199
Remove mention of Java install for local Selenium service
colinrotherham 365bb8e
Limit all GitHub Actions workflows
colinrotherham 4f51b22
Update GitHub checkout action
colinrotherham bde8f10
Update GitHub setup-node action
colinrotherham 5d8fc9e
Allow GitHub Actions to cancel in-progress workflows
colinrotherham 4e9caf8
Formatting etc
colinrotherham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,41 @@ | ||
name: Integration tests | ||
|
||
on: [push, pull_request] | ||
on: | ||
pull_request: | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: integration-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test-saucelabs: | ||
integration: | ||
name: Build & test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Read node version from .nvmrc | ||
id: nvm | ||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- name: "Setup Node v${{ steps.nvm.outputs.NVMRC }}" | ||
uses: actions/setup-node@v2 | ||
- name: Setup Node.js | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤩 |
||
uses: actions/setup-node@v4.0.0 | ||
with: | ||
node-version: "${{ steps.nvm.outputs.NVMRC }}" | ||
cache: 'npm' | ||
cache: npm | ||
check-latest: true | ||
node-version-file: .nvmrc | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: "Run integration tests" | ||
- name: Run browser tests (without Sauce Labs) | ||
run: npm run wdio:test | ||
env: | ||
SAUCE_ENABLED: "false" # ensure we don't use Sauce Labs | ||
SAUCE_ENABLED: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
name: Cross-browser tests | ||
|
||
# Our Sauce Labs account only allows 5 tests to run at a time. | ||
concurrency: saucelabs | ||
|
||
# Run for pull requests, or after changes to main branch, but not for any old | ||
# branch, to limit number of workflows contending for Sauce Labs access. | ||
on: | ||
pull_request: | ||
|
||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
|
||
# Our Sauce Labs account only allows 5 tests to run at a time. | ||
concurrency: saucelabs | ||
|
||
jobs: | ||
test-saucelabs: | ||
saucelabs: | ||
name: Build & test (with Sauce Labs) | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
@@ -22,28 +22,26 @@ jobs: | |
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Read node version from .nvmrc | ||
id: nvm | ||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- name: "Setup Node v${{ steps.nvm.outputs.NVMRC }}" | ||
uses: actions/setup-node@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4.0.0 | ||
with: | ||
node-version: "${{ steps.nvm.outputs.NVMRC }}" | ||
cache: 'npm' | ||
cache: npm | ||
check-latest: true | ||
node-version-file: .nvmrc | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: "Run cross-browser tests (using Sauce Labs)" | ||
- name: Run browser tests (with Sauce Labs) | ||
run: npm run wdio:test | ||
env: | ||
SAUCE_ENABLED: "true" | ||
SAUCE_BUILD_NUMBER: "${{ github.run_id }}" | ||
SAUCE_USERNAME: "${{ secrets.SAUCE_USERNAME }}" | ||
SAUCE_ACCESS_KEY: "${{ secrets.SAUCE_ACCESS_KEY }}" | ||
SAUCE_ENABLED: true | ||
SAUCE_BUILD_NUMBER: ${{ github.run_id }} | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
name: Test | ||
|
||
on: [pull_request, push] | ||
on: | ||
pull_request: | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: tests-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
test: | ||
name: Build & basic tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Read node version from .nvmrc | ||
id: nvm | ||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- name: "Setup Node v${{ steps.nvm.outputs.NVMRC }}" | ||
uses: actions/setup-node@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4.0.0 | ||
with: | ||
node-version: "${{ steps.nvm.outputs.NVMRC }}" | ||
cache: 'npm' | ||
cache: npm | ||
check-latest: true | ||
node-version-file: .nvmrc | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.18.2 | ||
lts/fermium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,29 +6,21 @@ If you want to help and want to get more familiar with the codebase, try startin | |
|
||
## Requirements | ||
|
||
You will need a recent version of Node and npm installed: | ||
You will need a recent version of Node and npm installed. Check the `.nvmrc` for a recommended version: | ||
|
||
```bash | ||
$ node -v | ||
v7.10.0 | ||
v14.21.3 | ||
$ npm -v | ||
v5.0.0 | ||
v6.14.18 | ||
``` | ||
|
||
If you want to run the selenium tests, you will also need a local copy of the Java Development Kit: | ||
To install Node (with npm) locally on macOS, we recommend [brew](https://brew.sh) with | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Phew, I saw Java in the first commit and thought I'd have to brush up... |
||
[nvm](https://github.com/nvm-sh/nvm): | ||
|
||
```bash | ||
$ java -version | ||
java version "1.8.0_131" | ||
Java(TM) SE Runtime Environment (build 1.8.0_131-b11) | ||
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) | ||
``` | ||
|
||
To install Node (with npm) and Java locally on macOS, you can use [brew](https://brew.sh/): | ||
|
||
```bash | ||
brew install node | ||
brew cask install java | ||
brew install nvm | ||
nvm install | ||
``` | ||
|
||
## Project structure | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting - was this just misnamed as
test-saucelabs
?