Skip to content

Commit

Permalink
chore: Remove redundant console.log (#305)
Browse files Browse the repository at this point in the history
* chore: Remove redundant console.log

* cleanup bin/cypress and tests

* refine package description

* rename test step

* rename steps in test.yml

* refine lint stage

* fix link in README
  • Loading branch information
tianfeng92 authored Aug 19, 2024
1 parent 011ab24 commit ec141ed
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 55 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

jobs:
test:
lint:
runs-on: ubuntu-latest

steps:
Expand All @@ -30,9 +30,6 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Build Project
run: npm run build

- name: Lint
run: npm run lint

Expand Down Expand Up @@ -62,11 +59,11 @@ jobs:
- name: Integration Tests
env:
SAUCE_CYPRESS_VIDEO_RECORDING: false
run: npm run test-integration
run: npm run test

build-windows-bundle:
runs-on: windows-latest
needs: [test]
needs: [lint, integration]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -118,7 +115,7 @@ jobs:
build-mac-bundle:
# macos-latest is arm only
runs-on: macos-13
needs: [test]
needs: [lint, integration]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ If you are interested to contribute to this project, please have a look into our
## Run Tests

### Integration tests
`npm run test-integration` triggers the [integration tests script](/tests/integration/integration-tests.sh). Which triggers the tests in (/tests/integration/fixtures/cypress-tests) and runs them through `cypress-runner.js`.

`npm run test` triggers the [integration tests script](/tests/integration/integration-tests.sh). Which triggers the [tests](/tests/integration/) and runs them through `cypress-runner.js`.

### Env Variables

#### `SAUCE_CYPRESS_VIDEO_RECORDING`

This env variable is for controlling cypress native video recording.
`true`/`1` will enable cypress native video recording.
`false`/`0` will stop cypress native video recording.

```sh
saucectl run -e SAUCE_CYPRESS_VIDEO_RECORDING=true
```

### `BROWSER_NAME`
Name of the browser to run the test on

#### `SAUCE_BROWSER_PATH`
Points to the browser binary path
33 changes: 0 additions & 33 deletions bin/cypress

This file was deleted.

3 changes: 0 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
{
"name": "sauce-cypress-runner",
"version": "0.0.0",
"description": "Sauce Labs test runner image for saucectl to run Cypress tests.",
"description": "Sauce Labs Cypress Runner",
"author": "devx <dev@saucelabs.com>",
"license": "MIT",
"private": true,
"bin": "./bin/cypress",
"main": "./lib/cypress-runner.js",
"homepage": "https://github.com/saucelabs/sauce-cypress-runner",
"repository": {
"type": "git",
"url": "git://github.com/saucelabs/sauce-cypress-runner.git"
},
"scripts": {
"test": "./bin/cypress",
"test-integration": "bash tests/integration/integration-tests.sh",
"test": "bash tests/integration/integration-tests.sh",
"build": "tsc",
"lint": "prettier --check '**/*.{js,ts,mjs,cjs}' && eslint tests/ src/",
"fmt": "prettier --write '**/*.{js,ts,mjs,cjs}'",
Expand Down
1 change: 0 additions & 1 deletion scripts/bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ mkdir ./bundle/
export CYPRESS_CACHE_FOLDER=$PWD/bundle/Cache/
echo $CYPRESS_CACHE_FOLDER
cp -r ./src/ ./bundle/src/
cp -r bin/ bundle/bin/
cp package.json bundle/package.json
cp package-lock.json bundle/package-lock.json
cp tsconfig.json bundle/tsconfig.json
Expand Down

0 comments on commit ec141ed

Please sign in to comment.