Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shairez committed Jun 2, 2023
0 parents commit 0b7322a
Show file tree
Hide file tree
Showing 70 changed files with 12,858 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"projectName": "playwright-qwik",
"projectOwner": "qwikifiers",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "angular",
"contributors": [
{
"login": "shairez",
"name": "Shai Reznik",
"avatar_url": "https://avatars1.githubusercontent.com/u/1430726?v=4",
"profile": "https://hirez.io/?utm_source=github&utm_medium=link&utm_campaign=playwright-qwik",
"contributions": [
"code",
"test",
"infra",
"doc",
"maintenance",
"review",
"ideas"
]
}
],
"contributorsPerLine": 7,
"skipCi": true
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://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
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
coverage
.eslintrc.*
vite.config.ts
40 changes: 40 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {},
"rules": {}
}
]
}
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# What is it?

- [ ] Feature / enhancement
- [ ] Bug
- [ ] Docs / tests
- [ ] Other

# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

# Use cases and why

<!-- Actual / expected behavior if it's a bug -->

- 1. One use case
- 2. Another use case

# Screenshots/Demo

<!-- Add your screenshots here -->

# Checklist:

- [ ] My code follows the [developer guidelines of this project](https://github.com/qwikifiers/playwright-qwik/blob/main/CONTRIBUTING.md)
- [ ] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation
- [ ] Added new tests to cover the fix / functionality
43 changes: 43 additions & 0 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

description: Release packages

inputs:
github_token:
description: GitHub token
required: true
npm_token:
description: NPM token
required: true
release_target:
description: Release target (patch, minor)
required: false
default: version-publish

runs:
using: composite
steps:
- name: Check Authentication with Registry
env:
NODE_AUTH_TOKEN: ${{ inputs.npm_token }}
shell: bash
run: npm whoami

- name: Version
env:
NODE_AUTH_TOKEN: ${{ inputs.npm_token }}
GITHUB_TOKEN: ${{ inputs.github_token }}
shell: bash
run: npx nx affected --base=last-release --target=${{ inputs.release_target }} --parallel=1

- name: Tag last-release
shell: bash
run: git tag -f last-release

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ inputs.github_token }}
branch: ${{ github.ref }}
force: true
tags: true
44 changes: 44 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: setup

description: Setup Node, cache and install deps

inputs:
node_version:
description: Node Version
required: false
default: '16'

runs:
using: composite
steps:
- name: Checkout all commits
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup git user
shell: bash
run: |
git config --global user.name '@qwikifiers'
git config --global user.email '[email protected]'
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7

- name: Use Node
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node_version }}
# This doesn't just set the registry url, but also sets
# the right configuration in .npmrc that reads NPM token
# from NPM_AUTH_TOKEN environment variable.
# It actually creates a .npmrc in a temporary folder
# and sets the NPM_CONFIG_USERCONFIG environment variable.
registry-url: https://registry.npmjs.org
cache: 'pnpm'

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile --config.auto-install-peers=false
26 changes: 26 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

description: Lint, Test and upload to Codecov

runs:
using: composite

steps:
# - name: Commitlint
# shell: bash
# run: npx --no-install commitlint --from=last-release

- name: Lint
shell: bash
run: npx nx affected:lint --base=last-release

- name: Test
shell: bash
run: npx nx affected --target=ct --base=last-release

# - name: E2E Tests
# shell: bash
# run: npx nx affected --target=e2e --base=last-release

# - name: Codecov upload
# uses: codecov/codecov-action@v2
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
- workflow_dispatch

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node_version: [16]

steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node_version: ${{ matrix.node_version }}

- name: Test
uses: ./.github/actions/test
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

release:
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/main'

needs: [test]

steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup

- name: Release
uses: ./.github/actions/release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
43 changes: 43 additions & 0 deletions .github/workflows/release_minor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release Minor

on:
- workflow_dispatch

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node_version: [16]

steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node_version: ${{ matrix.node_version }}

- name: Test
uses: ./.github/actions/test
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

release:
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/main'

needs: [test]

steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup

- name: Release
uses: ./.github/actions/release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
release_target: version-publish-minor
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node_version: [16]

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
if: github.event_name == 'pull_request'
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node_version: ${{ matrix.node_version }}

- name: Test
uses: ./.github/actions/test
Loading

0 comments on commit 0b7322a

Please sign in to comment.