From 18409b79a1495e545b90ab2ed34f79595d3e7512 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sun, 30 Oct 2022 17:02:40 +0100 Subject: [PATCH] Replace Sauce Labs with Playwright (#44) Ref https://github.com/Level/community/issues/117 --- .airtap.yml | 22 ++------- .github/workflows/browsers.yml | 24 ++++++++++ .github/workflows/sauce.yml | 29 ------------ .github/workflows/test.yml | 2 +- README.md | 11 +---- package.json | 5 +-- sauce-labs.svg | 81 ---------------------------------- 7 files changed, 31 insertions(+), 143 deletions(-) create mode 100644 .github/workflows/browsers.yml delete mode 100644 .github/workflows/sauce.yml delete mode 100644 sauce-labs.svg diff --git a/.airtap.yml b/.airtap.yml index b28bb6c..225fb41 100644 --- a/.airtap.yml +++ b/.airtap.yml @@ -1,23 +1,7 @@ providers: - - airtap-sauce + - airtap-playwright browsers: - - name: chrome + - name: chromium - name: firefox - # https://github.com/airtap/sauce/issues/11 - # - name: safari - # version: 12..latest - - name: ios_saf - version: 12..latest - - name: chrome for android - version: 6..latest - - name: msedge - -presets: - local: - providers: - - airtap-playwright - browsers: - - name: chromium - - name: firefox - - name: webkit + - name: webkit diff --git a/.github/workflows/browsers.yml b/.github/workflows/browsers.yml new file mode 100644 index 0000000..b655a1c --- /dev/null +++ b/.github/workflows/browsers.yml @@ -0,0 +1,24 @@ +name: Browsers +on: [push, pull_request] +permissions: + contents: read +jobs: + test: + name: Test + if: ${{ github.actor != 'dependabot[bot]' }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install + run: npm install --ignore-scripts + - name: Install Playwright dependencies + run: npx --no-install playwright install-deps + - name: Install Playwright + run: npx --no-install playwright install + - name: Test + run: npm run test-browsers diff --git a/.github/workflows/sauce.yml b/.github/workflows/sauce.yml deleted file mode 100644 index 0147786..0000000 --- a/.github/workflows/sauce.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Sauce Labs -on: push -permissions: - contents: read -concurrency: sauce-labs -jobs: - test: - name: Test - if: ${{ github.actor != 'dependabot[bot]' }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up node - uses: actions/setup-node@v3 - with: - node-version: 16 - - 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 }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40031e3..bf70714 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: with: node-version: ${{ matrix.node }} - name: Install - run: npm install + run: npm install --ignore-scripts - name: Test run: npm test - name: Coverage diff --git a/README.md b/README.md index ec4c9f1..d772630 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ [![npm](https://img.shields.io/npm/v/abstract-level.svg)](https://www.npmjs.com/package/abstract-level) [![Node version](https://img.shields.io/node/v/abstract-level.svg)](https://www.npmjs.com/package/abstract-level) [![Test](https://img.shields.io/github/workflow/status/Level/abstract-level/Test?label=test)](https://github.com/Level/abstract-level/actions/workflows/test.yml) +[![Browsers](https://img.shields.io/github/workflow/status/Level/abstract-level/Browsers?label=browsers)](https://github.com/Level/abstract-level/actions/workflows/browsers.yml) [![Coverage](https://img.shields.io/codecov/c/github/Level/abstract-level?label=\&logo=codecov\&logoColor=fff)](https://codecov.io/gh/Level/abstract-level) [![Standard](https://img.shields.io/badge/standard-informational?logo=javascript\&logoColor=fff)](https://standardjs.com) [![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org) @@ -194,9 +195,7 @@ const xyz = db.sublevel('xyz', { valueEncoding: 'json' }) ## Supported Platforms -We aim to support Active LTS and Current Node.js releases as well as browsers. Supported runtime environments may differ per implementation. As far as `abstract-level` goes, the following browsers are supported and continuously tested. - -[![Sauce Test Status](https://app.saucelabs.com/browser-matrix/abstract-leveldown.svg)](https://app.saucelabs.com/u/abstract-leveldown) +We aim to support Active LTS and Current Node.js releases, as well as evergreen browsers that are based on Chromium, Firefox or Webkit. Supported runtime environments may differ per implementation. ## Public API For Consumers @@ -1426,12 +1425,6 @@ npm install abstract-level See the [Contribution Guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details. -## Big Thanks - -Cross-browser Testing Platform and Open Source ♥ Provided by [Sauce Labs](https://saucelabs.com). - -[![Sauce Labs logo](./sauce-labs.svg)](https://saucelabs.com) - ## Donate Support us with a monthly donation on [Open Collective](https://opencollective.com/level) and help us continue our work. diff --git a/package.json b/package.json index 81c2425..53ca2d5 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "scripts": { "test": "standard && ts-standard *.ts types/*.ts && hallmark && (nyc -s node test/self.js | faucet) && nyc report", "test-browsers": "airtap --coverage test/self.js", - "test-browsers-local": "airtap --coverage -p local test/self.js", "coverage": "nyc report -r lcovonly" }, "files": [ @@ -24,8 +23,7 @@ "test", "types", "CHANGELOG.md", - "UPGRADING.md", - "sauce-labs.svg" + "UPGRADING.md" ], "dependencies": { "buffer": "^6.0.3", @@ -41,7 +39,6 @@ "@voxpelli/tsconfig": "^4.0.0", "airtap": "^4.0.4", "airtap-playwright": "^1.0.1", - "airtap-sauce": "^1.1.0", "faucet": "^0.0.3", "hallmark": "^4.0.0", "nyc": "^15.1.0", diff --git a/sauce-labs.svg b/sauce-labs.svg deleted file mode 100644 index 574cf16..0000000 --- a/sauce-labs.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Sauce Labs - - - - - - - - - - - - - - - -