Skip to content

Commit 342033d

Browse files
bump appium dependency and add spinner (#43)
1 parent 21840bb commit 342033d

File tree

5 files changed

+316
-140
lines changed

5 files changed

+316
-140
lines changed

.github/workflows/npm-publish.yml

+38-21
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,49 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3-
4-
name: Node.js Package
5-
1+
name: release
62
on:
7-
release:
8-
types: [created]
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- 'v*.*.*'
8+
pull_request:
9+
types:
10+
- labeled
911

1012
jobs:
11-
build:
13+
release:
14+
if: github.event.action != 'labeled'
1215
runs-on: ubuntu-latest
1316
steps:
1417
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
18+
- name: Post bumpr status comment
19+
uses: haya14busa/action-bumpr@v1
20+
21+
# Get tag name.
22+
- id: tag
23+
uses: haya14busa/action-cond@v1
1624
with:
17-
node-version: 12
18-
- run: npm ci
25+
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
26+
if_true: ${{ github.ref }}
27+
if_false: ${{ steps.bumpr.outputs.next_version }}
28+
29+
- name: Release
30+
uses: justincy/[email protected]
31+
id: release
32+
- uses: actions/setup-node@v1
33+
if: steps.release.outputs.released == 'true'
34+
with:
35+
registry-url: 'https://registry.npmjs.org'
36+
- name: Publish
37+
if: steps.release.outputs.released == 'true'
38+
run: echo "//registry.npmjs.org/:_authToken=${{secrets.npm_token}}" > .npmrc && npm ci && npm publish
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
41+
1942

20-
publish-npm:
21-
needs: build
43+
release-check:
44+
if: github.event.action == 'labeled'
2245
runs-on: ubuntu-latest
2346
steps:
2447
- uses: actions/checkout@v2
25-
- uses: actions/setup-node@v2
26-
with:
27-
node-version: 12
28-
registry-url: https://registry.npmjs.org/
29-
- run: npm ci
30-
- run: npm publish
31-
env:
32-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
48+
- name: Post bumpr status comment
49+
uses: haya14busa/action-bumpr@v1

__tests__/plugin.spec.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import { remote } from 'webdriverio';
22
import { command } from 'webdriver';
3-
import { pluginE2EHarness } from 'appium/test';
3+
import { pluginE2EHarness } from '@appium/plugin-test-support';
44
import path from 'path';
55
var chai = require('chai'),
6-
// eslint-disable-next-line no-unused-vars
7-
should = chai.should();
6+
chaiAsPromised = require('chai-as-promised');
7+
8+
chai.use(chaiAsPromised);
9+
// eslint-disable-next-line no-undef
10+
should = chai.should();
811
let expect = chai.expect;
912
import axios from 'axios';
1013

0 commit comments

Comments
 (0)