Commit Graph

75 Commits

Author SHA1 Message Date
Christopher Hiller 90c0d36f2a chore(ci): add cache cleanup workflow on PR close
I noticed we were filling up our allotted cache space.  Reading about it, I found this example to cleanup caches we no longer need (specifically, from closed PRs)
2023-02-15 10:50:36 -08:00
Christopher Hiller 12245ae98c chore(ci): add job to disallow merges of PRs
...if it has the "On Hold" label
2023-01-20 15:01:06 -08:00
Christopher Hiller a96d952a06 chore(ci): add doc build to ci 2023-01-20 10:31:46 -08:00
renovate[bot] d8323b3d3c chore(workflows): update actions/setup-node digest to 64ed1c7 2023-01-06 18:40:00 +00:00
renovate[bot] 5d1090555f chore(workflows): update actions/checkout digest to ac59398 2023-01-06 12:29:27 +00:00
renovate[bot] 3993decde4 chore(workflows): update actions/checkout digest to 755da8c 2022-12-14 10:10:32 +00:00
Christopher Hiller 8f4c09c8a7 chore(ci): remove broken commitlint job 2022-12-13 15:35:30 -08:00
renovate[bot] cf614b84b6 chore(workflows): update actions/checkout digest to 7dd9e2a 2022-12-13 10:24:20 +00:00
Christopher Hiller 44283b4c4e chore(appium,docutils,ci): remove doc gen from CI
What used to be the `generate-docs` script no longer works, since the `commands-yml` directory no longer exists.

Unclear to me what should be done here at this point, but it makes the "build command documentation" job pointless.
2022-12-06 11:21:05 -08:00
Christopher Hiller 7247708050 chore(ci): remove old script from CI 2022-12-06 11:21:05 -08:00
Christopher Hiller 78a4b3488e chore(ci): add commitlint workflow 2022-12-02 15:05:32 -08:00
Christopher Hiller b59af041d3 chore(ci): this re-enables the "deploy" workflow
Branch needed to be updated
2022-11-29 12:13:59 -08:00
Christopher Hiller 86a84018f0 chore(ci): always display lifecycle script output
also upgrade `bahmutov/npm-install`
2022-11-28 17:14:40 -08:00
Christopher Hiller 57904cca57 chore(ci): fix missing line in FOSSA workflow 2022-11-09 10:21:41 -08:00
Christopher Hiller 825c4edf17 chore(renovate): use shared config and group teen_process pkgs 2022-10-31 16:02:05 -07:00
Christopher Hiller 93f939982f chore(github): replace bug report template with bug report form 2022-10-31 13:26:22 -07:00
Dor Blayzer 94ee0a4127 chore(github): Replace old version of issues template (#17645)
* Update issue templates

Add bug and Feature report templates

* Delete ISSUE_TEMPLATE.md

Remove old version of Issue_template
2022-10-26 13:20:34 -07:00
renovate[bot] b7bd6b426a chore(workflows): update actions/setup-node digest to 8c91899 2022-10-14 08:08:01 +00:00
renovate[bot] c7072027d6 chore(workflows): update actions/checkout digest to 93ea575 2022-10-11 19:04:38 +00:00
renovate[bot] 08fc54b536 chore(workflows): update actions/setup-node digest to 969bd26 2022-09-28 11:11:40 +00:00
Jonathan Lipps 990645e296 chore: remove CLA link in PR template
it's managed by a bot now anyway
2022-09-13 13:43:36 -07:00
Christopher Hiller 0c70d27679 chore(ci): fix FOSSA workflow 2022-08-23 13:54:22 -07:00
Christopher Hiller 44422a1e58 chore(ci): use npm caches across jobs
I think this was just an oversight
2022-08-23 13:51:23 -07:00
Christopher Hiller 21dc828306 chore(ci): use midnight-smoker
This replaces use of GH action `boneskull/nodejs-production-test-action` with direct use of `midnight-smoker`. It's now trivial to run all the smoke tests in a development environment.
2022-08-23 13:51:23 -07:00
Christopher Hiller f5bc702c9a chore(ci): update to latest nodejs-production-test-action 2022-08-17 11:33:26 -07:00
Christopher Hiller 5efd62af08 chore(ci): fix target branch for FOSSA job 2022-08-02 16:18:39 -07:00
Christopher Hiller 018daac156 chore(): remove dependabot config 2022-07-20 11:42:33 -07:00
renovate[bot] 3608f0633d chore(workflows): update actions/setup-node digest to 2fddd88 2022-07-15 19:00:45 +00:00
renovate[bot] c8b9dfcd91 chore(workflows): pin actions/setup-node action to 5b949b5 2022-07-13 13:48:01 -07:00
Christopher Hiller dab37d7286 chore(ci): add mjpeg-consumer to dev deps
I am unsure why this was not in dev deps already. It is not a native module or anything, so...
2022-07-13 13:47:44 -07:00
Christopher Hiller 109278bb0d chore(ci): attempt to cache deps
This change adds [bahmutov/npm-install](https://github.com/bahmutov/npm-install) to help cache dependencies, and enables caching against global modules via [setup-node](https://github.com/actions/setup-node).
2022-07-13 13:47:44 -07:00
renovate[bot] d0ca5d5e7d chore(workflows): update actions/setup-node digest to 5b949b5 2022-07-12 13:29:07 +00:00
Mykola Mokhnach 0db78ae885 ci: Add a script that verifies Appium deployment on different OSs (#17146) 2022-07-08 08:38:14 +02:00
Christopher Hiller dc3eecbd7e chore(ci): enable quiet mode when running smoke tests 2022-06-13 16:08:17 -07:00
Christopher Hiller 485239d599 chore(ci): run smoke test in all packages
This uses the [boneskull/nodejs-production-test-action](https://github.com/boneskull/nodejs-production-test-action) GH action to run a smoke test across all packages.

The action does the following:

1. Runs `npm pack` on each package, writing the tarball to a temp dir. This tarball contains the package as a user would `npm install` it.
2. Changes into the temp dir and runs `npm install <tarball>` on each
3. Runs a specified script (in our case, `test:smoke`) in each installed package's dir in `<tmp_dir>/node_modules`

Because `devDependencies` will not be present, this should avoid a class of issues where production deps are miscategorized as dev deps.

The action should probably use a separate temp dir for each--in the case of a dependency being present but only because some other package depends on it--but it's not smart enough to figure out peer dependencies yet.
2022-06-13 16:08:17 -07:00
Renovate Bot e4682bb467 chore(workflows): update actions/setup-node digest to eeb10cf 2022-06-07 13:34:14 +00:00
Renovate Bot dfd6b94e14 chore(workflows): pin dependencies 2022-06-03 10:42:53 -07:00
neilnaveen 7e2412499a chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2022-05-18 11:58:51 -07:00
Christopher Hiller 5e24fbac5c chore(ci): add Node v18 to matrix; remove Node v17 2022-05-03 12:50:20 -07:00
Christopher Hiller 39aab21aef chore: "lerna link convert"; replace siblings with relative "file:" links
This is a "fix" but only for the dev environment.

Further:

- add install of `mjpeg-consumer` to CI, since it may have disappeared from the environment
- remove `overrides` from `@appium/support`'s `package.json` since it no longer seems needed
2022-04-25 14:37:28 -07:00
Christopher Hiller 8b010df295 chore: simplify test scripts
- `e2e-test` is now `test:e2e`
- removed `pre`/`post` lifecycle scripts because it's hard to parse what's happening
- in CI, e2e tests do _not_ run in parallel, no extra build occurs, no types are built, and no lint happens.  (types/lint happens in a diff job, and there aren't enough cores available for parallel mode to make a difference)
- removed a bunch of scripts to test individual packages. you can just `cd packages/<pkgname> && npm t`
2022-04-14 14:30:00 -07:00
Kazuaki Matsuo 8f4a5e9752 ci: drop nodejs 12, add 17 (#16703)
* ci: drop nodejs 12, add 18

* 17, not 18 yet as maximum version

* test: increase timeout
2022-04-05 15:31:25 +09:00
Renovate Bot e5ad7a9fd8 chore(workflows): update actions/checkout action to v3 2022-03-29 17:46:52 -07:00
Renovate Bot 3bfee19a66 chore(workflows): update actions/setup-node action to v3 2022-03-28 11:27:40 -07:00
Christopher Hiller 326b7b4e06 feat(support): generate declaration files
Most of these changes are the addition of types.  There are a few places in which the typechecker found weirdness, and I have addressed those.

- In `logging.js`, `parseInt()` was being called on props of `process.env`; this is not allowed, because `parseInt()` only accepts a string, and props may be `undefined`.
- In `log-internal.js`, I had to remove the `raiseError()` function because TypeScript is unable to understand that a function, when called, will always throw.  The fix was just to replace with `throw new Error...`
- Introduced a var in `mjpeg.js` to avoid repeated casting
- Added some type guards to `net.js`. as function parameters, union types kind of suck. This is definitely one place TS would have helped, since it allows function overloads.  Also dropped use of deprecated `url` module in lieu of W3C `URL`.
- Removed some old-node-version cruft from `util.js`.

Non-code changes:

- Needed to use an override for `type-fest`, as it's included as a transitive dependency, but otherwise is only present in the devdeps of the monorepo root `package.json`. This means, due to version conflicts, a `support/node_modules/type-fest` would be created with an old, incompatible version, which would be preferred over the monorepo one due to Node's resolution algorithm.  This needs npm v8.3+ to work properly, but is only a problem for contributors (not consumers).
- Pinned type of `opencvv-bindings`.
- No longer deleting `build` dir before transpilation since it may contain generated declarations!
2022-03-25 14:54:45 -07:00
Christopher Hiller 72085caa0a feat(types): add new @appium/types package
This changes the TS configuration to to a) emit declarations for supported packages, and b) build declarations incrementally by package.

To begin, we are targeting `appium`, `@appium/base-driver` and `@appium/support` for declarations; these three are intended to be published with declarations generated via their JS.

Both `@appium/support` and `appium` are fully typechecked (sans implicit `any` types), but `@appium/base-driver` is mostly not.  Regardless, declarations are generated for all three.

Each package will have its own `tsconfig.json` which "inherits" from `config/tsconfig.base.json`.  Each will also need to declare relative paths to dependencies. e.g., the `appium` package must configure its `tsconfig.json` so that it depends on the declarations of `@appium/support` and also where to find `@appium/support`. Essentially, a small dependency tree gets built, and those at the "root" get their declarations built first; then the consumers use those declarations.

Also reorganized some scripts and added `npm-run-all` to help and added a "typecheck" job to CI.

Since `npm install` will build, it's pretty inconvenient to have `npm` abort installation if the build fails.  In that case, if any of the build steps fail (see `build:loose`) the installation will continue.  Added a `prepublishOnly` which runs a build in "strict" mode where everything must pass.

_Note: there's still a strong coupling of "what `BaseDriver` provides" and "what an external driver *may* provide".  It's unclear to me if this is a problem, though there seem to be a handful of methods that external drivers *must* implement.  The easiest way to get around this would probably be to extract these required properties and methods into their own interface (duplication) if we cannot otherwise declare methods as "abstract".  As it stands, the `Driver` is basically just `BaseDriver`._

Also:

- Moved some configuration types out of `appium` and into here, since they are used both by `appium` and `base-driver` via `DriverOpts`
- Split `Driver` type into "the thing that BaseDriver is" and "all the other methods external drivers can implement"
- Added missing `proxyCommand` method
- Better generics for `LogType`
- Remove unused `Constructor` type
- Better types for `getSession`/`getSessions`
- Added util `Class` type
- Added many missing typings from DefinitelyTyped
- Added `ts-node` for `@wdio/types` (I need to send a PR to webdriver to eliminate this dependency)
- Type checks in their CI step
2022-03-25 14:54:45 -07:00
Christopher Hiller c653d2cf3b chore: lint the code once per build action
Previously, every version of Node.js would run eslint, which is redundant
2022-03-10 10:52:02 -08:00
Christopher Hiller ab9e2458ee chore: add workflow_dispatch event trigger
update install script URL.
2021-12-03 11:53:22 -08:00
Christopher Hiller fa453a18db chore: restrict FOSSA workflow
This PR moves the FOSSA check from the Node workflow to its own.  It won't run if the API key secret is not present (which would be true when running PRs from forks).

In addition, the check

1. will only run on changes to any `package.json` in the monorepo
2. runs `fossa test` to fail upon failure (previously it would only fail upon _error_)
2021-12-03 11:53:22 -08:00
Christopher Hiller 91c3ff7f19 chore: attempt to get install-fake-driver working again in CI 2021-11-18 12:08:50 -08:00