-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
other: Add node.js versions matrix to ci
- Loading branch information
1 parent
c8c1bb7
commit e6117b7
Showing
2 changed files
with
65 additions
and
22 deletions.
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
on-pull-request: | ||
name: test | ||
strategy: | ||
matrix: | ||
node-version: [lts/fermium, lts/gallium, lts/hydrogen] | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Print node version | ||
run: node -v | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run build | ||
run: npm run build | ||
|
||
- if: matrix.node-version == 'lts/hydrogen' # starting from v18 there is FormData implementation in Node.js | ||
name: Run Node.js integration tests with builtin FormData | ||
run: export LAUNCH_TYPE=native && npm run test:node | ||
|
||
- name: Run Node.js integration tests with form-data package | ||
run: export LAUNCH_TYPE=native && npm run test:node | ||
|
||
- name: Copy dist for test server | ||
run: cp ${{ github.workspace}}/dist/mailgun.web.js ${{ github.workspace}}/integration_tests/server/dist/mailgun.web.js | ||
|
||
- name: Serve Files | ||
uses: Eun/http-server-action@v1 | ||
with: | ||
directory: ${{ github.workspace}}/integration_tests/server/ | ||
port: 3000 | ||
no-cache: false | ||
allowed-methods: | | ||
["GET", "HEAD", "POST"] | ||
log: "log.txt" | ||
logTime: "false" | ||
|
||
- run: curl -vvvv http://localhost:3000/pages/AMD.html && cat log.txt | ||
|
||
- name: Run Browser integration tests | ||
run: export LAUNCH_TYPE=amd && npm run test:browser | ||
|
||
- name: Show expected changes in the changelog file | ||
run: npm run release:test |
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