Skip to content

Add integration tests #133

Add integration tests

Add integration tests #133

name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
on-pull-request:
name: test
strategy:
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/hydrogen
- name: Print node version
run: node -v
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run build
run: npm run build
- name: Run tests
run: npm test
- name: Run Node.js integration tests
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
- 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