Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
feat: first version
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Jan 17, 2023
1 parent ec6866f commit 65aa75b
Show file tree
Hide file tree
Showing 23 changed files with 14,113 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"plugins": ["eslint-plugin-html"],
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"env": {
"es6": true,
"node": true,
"browser": true,
"jest": true
}
}
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Report a bug that you encounter
title: "Bug: "
labels: bug
assignees: ""
---

## Bug description

Describe the bug, context and use case.

### Correct behavior expected

Describe the correct behavior you expect to happen if there is no bug.

### Wrong behavior observed

Describe the wrong behavior that happen because of the bug.

### Screenshot

_Optional:_ Add a screenshot to help explain the problem.

## Reproduce

Describe a way to reproduce the bug.

You can share a code snippet or give a step by step guide.

## Setup

Describe the setup you have when you encounter the bug : device, browser, library version...

## Additional information

Add any other information that can help us understand the bug or fix it.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature request
about: Suggest an idea for this project
title: "Feat: "
labels: "enhancement"
assignees: ""
---

<!-- Rephrase the feature as a user story format : -->

As a [user|client|developer], I would like to ...

## Description

Describe the feature, context and use case.
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Description

Please explain the changes you made here.

## Type of changes

Select the correct labels: `bug`, `enhancement` or `documentation`.

## Checklist

Valid all before asking for a code review to `argos-ci/code` :

- [ ] I have read the CONTRIBUTING doc
- [ ] The commits message follows the [Conventional Commits' policy](https://www.conventionalcommits.org/)
- [ ] Lint and unit tests pass locally
- [ ] I have added tests if needed

Optional checks:

- [ ] My changes requires a change to the documentation
- [ ] I have updated the documentation accordingly

## Further comments

*Optional* : Feel free to explain your motivation, share useful information or a feature screenshot.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm ci

- name: Format
run: npm run format

- name: Lint
run: npm run lint

- name: Check format
run: npm run check-format

- name: Install playwright browsers
run: npx playwright install --with-deps chromium

- name: Test
run: npm run test

- name: Argos upload screenshots
run: npx @argos-ci/cli upload ./screenshots
13 changes: 13 additions & 0 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Trigger https://argos-ci.com/docs build

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Call Netlify Webhook
run: curl -X POST -d {} https://api.netlify.com/build_hooks/6355731ceb0bed1962bae7fc
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
screenshots/*
!screenshots/.gitkeep
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
!index.js
!index.cjs
!index.d.ts
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CHANGELOG.md
package-lock.json
package.json
Empty file added CHANGELOG.md
Empty file.
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
contact@argos-ci.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing

If you're reading this, you're awesome!
Thank you for helping us make this project great and for being a part of the Argos community. Here are a few guidelines that will help you along the way.

## Open an Issue

If you think you have found a bug or have a new feature idea, please start by making sure it hasn't already been [reported or fixed](https://github.com/argos-ci/argos-playwright/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aclosed).

Then, you can search through existing issues and PRs to see if someone has written one similar to yours.

Next, please create a new issue that briefly explains the problem and provides some background on the circumstances that triggered it and the steps to reproduce it.

Please don't group multiple topics into one issue.

## Submit a Pull Request

Argos CI is a community project, so pull requests are always welcome, but before working on a significant change, it is best to open an issue first to discuss it with the maintainers.

When in doubt, keep your pull requests small. To give a PR the best chance of getting accepted, don't bundle more than one feature or bug fix per pull request.
It's always best to create two smaller PRs than one big one.

When adding new features or modifying existing code, please attempt to include tests to confirm the new behavior.

## Getting started

You should push your local changes to your forked GitHub repository and then open a pull request from your repo to the `argos-ci/argos-playwright` repository.

1. Fork the argos repository on Github
2. Clone your fork to your local machine: `git clone --depth 1 git@github.com:<your-login>/argos-playwright.git`
3. Create a branch: `git checkout -b my-topic-branch`
4. Make your changes
5. Run the tests: `npm run test`
6. Format and lint the code: `npm run format && npm run lint`
7. Push your branch to github: `git push --set-upstream origin my-topic-branch`
8. Visit github and make your pull request.

### Update local repository

If you have an existing local repository, please update it before you start to minimize the chance of merge conflicts.

```js
git remote add upstream git@github.com:argos-ci/argos.git
git checkout main
git pull upstream main
git checkout -b my-topic-branch
npm install
```

## Coding style

Please follow the coding style of the current code base. Argos uses eslint, so if possible, enable linting in your editor to get real-time feedback.
Linting can be run manually with `npm run lint`.

When you submit a pull request, the Continuous Integration testing rerun the linting, but hopefully, by then, your code is already clean!

## Roadmap

To get a sense of where argos is heading, or for ideas on where you could contribute, take a look at the opened issues.

## License

By contributing your code to the argos-ci/argos GitHub repository, you agree to license your contribution under this repository license.
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2023 Smooth Code

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<p align="center">
<a href="https://argos-ci.com/?utm_source=github&utm_medium=logo" target="_blank">
<img src="https://github.com/raw/argos-ci/argos/main/resources/logos/logo-github-readme.png" alt="Argos" width="300" height="61">
</a>
</p>

_Argos is a visual testing solution that fits in your workflow to avoid visual regression. Takes screenshots on each commit and be notified if something changes._

# Official Argos Playwright integration

[![npm version](https://img.shields.io/npm/v/@argos-ci/playwright.svg)](https://www.npmjs.com/package/@argos-ci/playwright)
[![npm dm](https://img.shields.io/npm/dm/@argos-ci/playwright.svg)](https://www.npmjs.com/package/@argos-ci/playwright)
[![npm dt](https://img.shields.io/npm/dt/@argos-ci/playwright.svg)](https://www.npmjs.com/package/@argos-ci/playwright)

Visit [argos-ci.com/docs/playwright](https://argos-ci.com/docs/playwright) for guides, API and more.

## Links

- [Official SDK Docs](https://argos-ci.com/docs/)
- [Discord](https://discord.gg/WjzGrQGS4A)
Loading

0 comments on commit 65aa75b

Please sign in to comment.