Skip to content

Commit

Permalink
Upgrade airtap and use GitHub Actions
Browse files Browse the repository at this point in the history
- Upgrade airtap to v4
- Move Sauce Labs tests from Travis to GitHub Actions
- Use playwright for headless local testing
  • Loading branch information
vweevers committed Sep 19, 2020
1 parent 7eded7b commit 405790c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 36 deletions.
27 changes: 14 additions & 13 deletions .airtap.yml
@@ -1,17 +1,18 @@
sauce_connect: true
providers:
- airtap-sauce

browsers:
- name: chrome
version: latest
platform: Windows 10
- name: internet explorer
version: latest
platform: Windows 10
- name: ie
- name: firefox
version: latest
platform: Windows 10
- name: safari
version: latest
platform: Mac 10.13
- name: microsoftedge
version: latest
platform: Windows 10
- name: edge

presets:
local:
providers:
- airtap-playwright
browsers:
- name: chromium
- name: firefox
- name: webkit
24 changes: 24 additions & 0 deletions .github/workflows/sauce.yml
@@ -0,0 +1,24 @@
name: Sauce Labs
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install
run: npm install
env:
# Download Sauce Connect binary now instead of on first run
SAUCE_CONNECT_DOWNLOAD_ON_INSTALL: true
- name: Add host
run: echo "127.0.0.1 airtap.local" | sudo tee -a /etc/hosts
- name: Test
run: npm run test-browsers
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
1 change: 1 addition & 0 deletions .npmignore
Expand Up @@ -8,5 +8,6 @@ zlib.js
.babelrc
.travis.yml
.nyc_output
.github
coverage
doc/
26 changes: 6 additions & 20 deletions .travis.yml
@@ -1,23 +1,9 @@
language: node_js
notifications:
email: false
matrix:
fast_finish: true
include:
- node_js: 6
env: CMD=test
- node_js: 8
env: CMD=test
- node_js: 9
env: CMD=test
- node_js: 10
env: CMD=test
- node_js: 12
env: CMD=test
- node_js: 12
env: CMD=test-browsers
addons:
sauce_connect: true
hosts:
- airtap.local
script: npm run $CMD
node_js:
- 6
- 8
- 9
- 10
- 12
8 changes: 5 additions & 3 deletions package.json
Expand Up @@ -16,7 +16,9 @@
"@babel/core": "^7.2.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.2.0",
"airtap": "0.0.9",
"airtap": "^4.0.0",
"airtap-playwright": "^1.0.1",
"airtap-sauce": "^1.0.0",
"assert": "^1.4.0",
"bl": "^2.0.0",
"deep-strict-equal": "^0.2.0",
Expand All @@ -36,8 +38,8 @@
"scripts": {
"test": "tap -J --no-esm test/parallel/*.js test/ours/*.js",
"ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap",
"test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js",
"test-browser-local": "airtap --open --local -- test/browser.js",
"test-browsers": "airtap test/browser.js",
"test-browsers-local": "airtap -p local test/browser.js",
"cover": "nyc npm test",
"report": "nyc report --reporter=lcov",
"update-browser-errors": "babel -o errors-browser.js errors.js"
Expand Down

0 comments on commit 405790c

Please sign in to comment.