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

chore(npm/angular): migrate angular adapter to monorepo #16434

Merged
merged 17 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from 11 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
22 changes: 22 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,25 @@ jobs:
working_directory: npm/design-system
- store-npm-logs

npm-angular:
<<: *defaults
steps:
- restore_cached_workspace
- restore_cache:
name: Restore yarn cache
key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-npm-angular-babel-cache
- run:
name: Build
command: yarn workspace @cypress/angular build
- run:
name: Run tests
command: yarn test-ci
working_directory: npm/angular
- store_test_results:
path: npm/angular/test_results
- store_artifacts:
path: npm/angular/test_results
- store-npm-logs

npm-react:
<<: *defaults
Expand Down Expand Up @@ -1972,6 +1991,9 @@ linux-workflow: &linux-workflow
- npm-react:
requires:
- build
- npm-angular:
requires:
- build
- npm-mount-utils:
requires:
- build
Expand Down
13 changes: 13 additions & 0 deletions npm/angular/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
43 changes: 43 additions & 0 deletions npm/angular/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"plugins": [
"cypress",
"@cypress/dev",
"@angular-eslint/eslint-plugin"
],
"extends": [
"plugin:@cypress/dev/general",
"plugin:@cypress/dev/tests"
],
"parser": "@typescript-eslint/parser",
"env": {
"cypress/globals": true
},
"root": true,
"globals": {
"jest": "readonly"
},
"rules": {
"no-console": "off",
"mocha/no-global-tests": "off",
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "off",
"@typescript-eslint/no-unused-vars": "off"
},
"overrides": [
{
"files": [
"lib/*",
"src/*"
]
},
{
"files": [
"**/*.json"
],
"rules": {
"quotes": "off",
"comma-dangle": "off"
}
}
]
}
27 changes: 27 additions & 0 deletions npm/angular/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
lmiller1990 marked this conversation as resolved.
Show resolved Hide resolved
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

<!-- 👋 Use the template below to report a bug. Fill in as much info as possible.

As an open source project with a small maintainer team, it may take some time for your issue to be addressed. Please be patient and we will respond as soon as we can. 🙏 -->

### Current behavior
<!-- A description including screenshots, stack traces, DEBUG logs, etc. 👉

### Desired behavior
<!-- Remember, we are not familiar with the application you're testing, so please provide a clear description of what should happen.-->

### Test code to reproduce
<!-- Provide test code that we can copy, paste, and run on our machine to see the issue. -->

<!-- You could also provide a repo that we can clone and run -->

### Versions

<!-- cypress angular unit test version, last known working Cypress version (if applicable), angular version, Browser and version, Operating System, CI Provider, etc -->
30 changes: 30 additions & 0 deletions npm/angular/.github/workflows/badges.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: badges
# update README badge only if the README file changes
# or if the package.json file changes, or this files changes
on:
push:
branches:
- master
paths:
- README.md
- package.json
- .github/workflows/badges.yml

jobs:
build:
name: Badges
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v2

- name: Update version badges 🏷
run: |
npx -p dependency-version-badge update-badge cypress

# commit any changed files
# https://github.com/mikeal/publish-to-github-action
- name: Push any changes to repo 📤
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions npm/angular/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ci
lmiller1990 marked this conversation as resolved.
Show resolved Hide resolved
on: [push, pull_request]
jobs:
build:
name: Tests
runs-on: ubuntu-latest
# run all 4 jobs in parallel and split the tests among them
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]
steps:
- name: Checkout 🛎
uses: actions/checkout@v2

- name: Install dependencies 📦
uses: cypress-io/github-action@v2
with:
runTests: false

- name: Build 🏗
run: npm run build

- name: Test 🧪
run: npx cypress run-ct --record --parallel
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

- name: Upload artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
**/screenshots/**/*(failed).png
**/init.diff.png
**/videos/**
29 changes: 29 additions & 0 deletions npm/angular/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: release
on:
workflow_dispatch:
inputs:
release:
description: Pass true for launch release
required: true
jobs:
build:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v2

- name: Install dependencies 📦
uses: cypress-io/github-action@v2
with:
runTests: false

- name: Build 🏗
run: npm run build

- name: Semantic Release 🚀
uses: cycjimmy/semantic-release-action@v2
if: github.event.inputs.release == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
53 changes: 53 additions & 0 deletions npm/angular/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules
/no_modules

# profiling files
chrome-profiler-events.json
speed-measure-plugin.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
cypress/videos
**/videos
**/screenshots
node_modules
.nyc_output
coverage
debug.log
*.tgz
All Component Specs
6 changes: 6 additions & 0 deletions npm/angular/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
lmiller1990 marked this conversation as resolved.
Show resolved Hide resolved
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
Loading