Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Use node 22 #231

Merged
merged 5 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

22 changes: 0 additions & 22 deletions .eslintrc

This file was deleted.

24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
workflow_dispatch:
inputs:
releaseType:
description: 'Release type - major, minor or patch'
description: "Release type - major, minor or patch"
required: false
default: ''
default: ""
preReleaseFlavor:
description: 'Pre-Release flavor - rc, beta, or anything'
description: "Pre-Release flavor - rc, beta, or anything"
required: false
default: ''
default: ""

jobs:
create-release-draft:
Expand Down Expand Up @@ -131,8 +131,8 @@ jobs:
if: ${{ steps.prep.outputs.asset_id == '' }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"

- name: Update Release Version
if: ${{ steps.prep.outputs.asset_id == '' }}
Expand Down Expand Up @@ -207,8 +207,8 @@ jobs:
if: ${{ steps.prep.outputs.asset_id == '' }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"

- name: Update Release version
if: ${{ steps.prep.outputs.asset_id == '' }}
Expand Down Expand Up @@ -274,8 +274,8 @@ jobs:
runs-on: ubuntu-latest
needs: publish-release
env:
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -307,8 +307,8 @@ jobs:
runs-on: ubuntu-latest
needs: publish-release
env:
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:

env:
GITHUB_TOKEN: ${{ github.token }}
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand All @@ -24,8 +24,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"

- uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
Expand Down Expand Up @@ -55,13 +55,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: "3.12"

- name: Google Cloud Login
id: 'auth'
Expand Down Expand Up @@ -114,13 +114,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Google Cloud Login
id: 'auth'
Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Setup saucectl
uses: saucelabs/saucectl-run-action@v4
Expand All @@ -249,7 +249,7 @@ jobs:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: github-testcafe-sc-check-tunnel-${{ matrix.os }}-${{ matrix.browser }}
scVersion: 4.9.1
scVersion: 4.9.2

- name: Test on Sauce
working-directory: ./tests/cloud/
Expand Down Expand Up @@ -280,7 +280,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Setup saucectl
uses: saucelabs/saucectl-run-action@v4
Expand All @@ -300,7 +300,7 @@ jobs:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: github-testcafe-sc-check-tunnel-${{ matrix.os }}
scVersion: 4.9.1
scVersion: 4.9.2

- name: Test on Sauce
working-directory: ./tests/cloud/
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
75 changes: 37 additions & 38 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,57 @@
# Contributing to `sauce-testcafe-runner`

**Thank you for your interest in `sauce-testcafe-runner`. Your contributions are highly welcome.**
**Thank you for your interest in `sauce-testcafe-runner`. We highly appreciate and welcome your contributions.**

There are multiple ways of getting involved:
## Ways to Get Involved

- [Report a bug](#report-a-bug)
- [Suggest a feature](#suggest-a-feature)
- [Contribute code](#contribute-code)
- **[Report a Bug](#report-a-bug)**: Identify and report any issues or bugs.
- **[Suggest a Feature](#suggest-a-feature)**: Propose ideas for new features or improvements.
- **[Contribute Code](#contribute-code)**: Help develop and enhance the project by contributing your coding skills.

Below are a few guidelines we would like you to follow.
If you need help, please reach out to us by opening an issue.
For any assistance, please don't hesitate to reach out by opening an [issue](/issues).

## Report a bug
Reporting bugs is one of the best ways to contribute. Before creating a bug report, please check that an [issue](/issues) reporting the same problem does not already exist. If there is such an issue, you may add your information as a comment.
## Report a Bug

To report a new bug you should open an issue that summarizes the bug and set the label to "bug".
Before reporting a bug, please check if there is an [existing issue](/issues) addressing the same concern. If such an issue exists, feel free to contribute by adding your comments.

If you want to provide a fix along with your bug report: That is great! In this case please send us a pull request as described in section [Contribute Code](#contribute-code).
To report a new bug:
- Open an issue summarizing the bug details.
- Label it as "bug."
- If you have a solution or a fix, wonderful! Please submit a pull request as outlined in the [Contribute Code](#contribute-code) section.

## Suggest a feature
To request a new feature you should open an [issue](../../issues/new) and summarize the desired functionality and its use case. Set the issue label to "feature".
## Suggest a Feature

## Contribute code
This is an outline of what the workflow for code contributions looks like
To suggest a new feature:
- Open a [new issue](../../issues/new).
- Describe the desired functionality and its use case.
- Label the issue as "feature."

- Check the list of open [issues](../../issues). Either assign an existing issue to yourself, or
create a new one that you would like work on and discuss your ideas and use cases.
## Contribute Code

It is always best to discuss your plans beforehand, to ensure that your contribution is in line with our goals.
### Code Contribution Workflow

- Fork the repository on GitHub
- Create a topic branch from where you want to base your work. This is usually 'main'.
- Open a new pull request, label it `work in progress` and outline what you will be contributing
- Make commits of logical units.
- Make sure you sign-off on your commits `git commit -s -m "adding X to change Y"`
- Write good commit messages (see below).
- Push your changes to a topic branch in your fork of the repository.
- As you push your changes, update the pull request with new infomation and tasks as you complete them
- Project maintainers might comment on your work as you progress
- When you are done, remove the `work in progess` label and ping the maintainers for a review
- Your pull request must receive a :thumbsup: from two [maintainers](MAINTAINERS)
1. **Explore Open Issues**: Browse through the [open issues](../../issues). You can either work on an existing issue or create a new one to discuss your ideas.
2. **Fork and Branch**: Fork the repository and create a branch from the `main` branch to base your work.
3. **Start a Pull Request**: Open a pull request and label it `work in progress`. Outline your contributions.
4. **Commit Your Changes**: Commit your changes in logical units. Ensure you sign off on your commits using `git commit -s -m "adding X to change Y"`.
5. **Engage**: Push your changes to your branch and update your pull request with any new information or completed tasks. Engage with feedback from project maintainers.
6. **Final Review**: Once completed, remove the `work in progress` label and request a final review from the maintainers.
7. **Approval**: Your pull request must receive approval from at least two [maintainers](MAINTAINERS).

Thanks for your contributions!
### Commit Messages

### Commit messages
Your commit messages ideally can answer two questions: what changed and why. The subject line should feature the “what” and the body of the commit should describe the “why”.
Your commit messages should clearly articulate what changed and why:
- **Subject**: Briefly describe what was changed.
- **Body**: Explain why these changes were necessary.

When creating a pull request, its description should reference the corresponding issue id.
Ensure the pull request description references the corresponding issue ID.

### Sign your work / Developer certificate of origin
All contributions (including pull requests) must agree to the Developer Certificate of Origin (DCO) version 1.1. This is exactly the same one created and used by the Linux kernel developers and posted on http://developercertificate.org/. This is a developer's certification that he or she has the right to submit the patch for inclusion into the project. Simply submitting a contribution implies this agreement, however, please include a "Signed-off-by" tag in every patch (this tag is a conventional way to confirm that you agree to the DCO) - you can automate this with a [Git hook](https://stackoverflow.com/questions/15015894/git-add-signed-off-by-line-using-format-signoff-not-working)
### Developer Certificate of Origin

```
git commit -s -m "adding X to change Y"
All contributions must adhere to the Developer Certificate of Origin (DCO) version 1.1, as documented at [developercertificate.org](http://developercertificate.org/). This implies that by submitting a contribution, you certify that you have the right to do so. Please include a "Signed-off-by" tag in every patch, which can be automated with a [Git hook](https://stackoverflow.com/questions/15015894/git-add-signed-off-by-line-using-format-signoff-not-working).

```bash
git commit -s -m "Describe your change"
```

**Have fun, and happy hacking!**
**Enjoy contributing, and happy coding!**
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Sauce Testcafe Runner
======================
# Sauce TestCafe Runner

Sauce Labs test runner image for [`saucectl`](https://github.com/saucelabs/saucectl) to run [TestCafe](https://testcafe.io/) tests using [saucectl](https://docs.saucelabs.com/dev/cli/saucectl/). This repository contains the code that is being executed in Sauce Labs when running `saucectl run`.
Sauce Labs provides a test runner for [`saucectl`](https://github.com/saucelabs/saucectl) designed specifically to run [TestCafe](https://testcafe.io/) tests. This repository hosts the code executed in Sauce Labs during a `saucectl run`.

If you are interested to contribute to this project, please have a look into our [contribution guidelines](https://github.com/saucelabs/sauce-testcafe-runner/blob/main/CONTRIBUTING.md).
Interested in contributing? Check out our [contribution guidelines](https://github.com/saucelabs/sauce-testcafe-runner/blob/main/CONTRIBUTING.md) for more information on how to get involved.
55 changes: 23 additions & 32 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,36 @@
# Releasing

Releasing a new version of the runner requires a Github Action to be triggered.
Releasing a new version of the runner is facilitated through a specific GitHub Action.

## How to release
## How to Release

The workflow is named [Release New Version](../../actions/workflows/release.yml).\
It has to be manually trigger, *without* creating a tag before or a release, everything will be taken care of.
To initiate a release, trigger the [Release New Version](../../actions/workflows/release.yml) workflow manually. This process does not require the creation of a tag or a release beforehand, as these steps are automated.

A new release can be made either from `main`, or any other branch.
Releases can be made from the `main` branch or any other branch, offering flexibility in the development process.

Two settings are available:
- `Release type - major, minor or patch`
- `Pre-Release flavor - rc, beta, or anything`
### Available Settings
- **Release Type**: Choose from `major`, `minor`, or `patch`, following [SemVer](https://semver.org/) guidelines.
- **Pre-Release Flavor**: Options include `rc`, `beta`, or custom labels. Omitting this setting assumes a stable and complete release.

### Release type - major, minor or patch
#### Note:
When updating an existing pre-release, avoid specifying a new release type to maintain version continuity.

Type-in the expected value depending the changes you are releasing.\
This is intended to be respectul of [SemVer](https://semver.org/)
### Examples of Release Behavior

### Pre-Release flavor - rc, beta, or anything
The behavior of the release process varies based on the inputs provided:

To publish a pre-release, you need to define a flavor. Any release without flavor is assumed to be a stable and complete release.
| Current Version | Release Type | Pre-Release Flavor | New Version |
|-----------------|--------------|--------------------|-------------|
| 1.5.7 | major | | 2.0.0 |
| 1.5.7 | major | rc | 2.0.0-rc.0 |
| 2.0.0-rc.0 | | rc | 2.0.0-rc.1 |
| 2.0.0-rc.1 | major | | 2.0.0 |

> Nota:
> If you need to update the same flavor, you *must not* specify a release type.
#### Important:

## Examples
Ensure not to consecutively specify both a release type and a pre-release flavor more than once to prevent unintended version increments.

Expected behavior depending inputs

| Current Version | Release type value | Pre-Release flavor | New version |
| --- | --- | --- | --- |
| 1.5.7 | major | | 2.0.0 |
| 1.5.7 | major | rc | 2.0.0-rc.0 |
| 2.0.0-rc.0 | | rc | 2.0.0-rc.1 |
| 2.0.0-rc.1 | major | | 2.0.0 |


> Avoid specifying twice in a row both `release type` and `pre-release flavor`, as it will increase version.
>
> | Current Version | Release type value | Pre-Release flavor | New version |
> | --- | --- | --- | --- |
> | 1.5.7 | major | rc | 2.0.0-rc.0 |
> | 2.0.0-rc.0 | major | rc | ***3.0.0-rc.0*** |
| Current Version | Release Type | Pre-Release Flavor | Resulting Version |
|-----------------|--------------|--------------------|-------------------|
| 1.5.7 | major | rc | 2.0.0-rc.0 |
| 2.0.0-rc.0 | major | rc | ***3.0.0-rc.0*** |
37 changes: 37 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const ts = require('typescript-eslint');
const js = require('@eslint/js');
const prettier = require('eslint-config-prettier');
const jest = require('eslint-plugin-jest');

module.exports = ts.config(
js.configs.recommended,
...ts.configs.recommended,
prettier,
{
plugins: {
jest: jest,
},
},
{
ignores: ['lib/**'],
},
{
files: ['**/*.*js', '**/*.*ts'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'no-undef': 'warn',
},
},
{
languageOptions: {
globals: {
__dirname: true,
console: true,
exports: true,
module: true,
require: true,
},
},
},
);
Loading
Loading