Skip to content

Commit

Permalink
Merge pull request #111 from chialab/v4
Browse files Browse the repository at this point in the history
v4
  • Loading branch information
edoardocavazza authored Nov 11, 2023
2 parents 2eb165e + 968e6d6 commit e02d1e5
Show file tree
Hide file tree
Showing 99 changed files with 12,445 additions and 13,678 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-ears-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chialab/dna': major
---

Remove support for node environment.
5 changes: 5 additions & 0 deletions .changeset/hip-worms-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chialab/dna': major
---

Use quantum to handle component slotted children in light DOM.
5 changes: 5 additions & 0 deletions .changeset/poor-carpets-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chialab/dna': major
---

Expose `$await` and `$pipe` directives to treat promises and observables.
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"@chialab/dna": "3.22.0"
},
"changesets": []
}
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# RNA
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
Expand Down Expand Up @@ -32,5 +31,3 @@ indent_size = 4
# Allow trailing whitespaces in markdown for new line statements
[*.{md,markdown}]
trim_trailing_whitespace = false

# RNA
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
coverage
public
docs/.vitepress/dist
docs/.vitepress/cache
10 changes: 4 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"extends": "@chialab/eslint-config/typescript",
"parserOptions": {
"project": false
"extends": "@chialab/eslint-config",
"plugins": ["jsdoc"],
"env": {
"browser": true
},
"plugins": [
"jsdoc"
],
"rules": {
"jsdoc/check-param-names": 1,
"jsdoc/check-property-names": 1,
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '37 9 * * 2'

Expand All @@ -32,17 +32,17 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'typescript' ]
language: ['typescript']

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
165 changes: 165 additions & 0 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: Lint and Test
on:
workflow_call:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: yarn

- name: Install project dependencies
run: yarn install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true

- name: Run build script
run: yarn build

- name: Check package
run: yarn publint

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: DNA
path: |
dist
types
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: yarn

- name: Install project dependencies
run: yarn install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true

- name: Lint
run: yarn lint

test-browser:
name: Test Browsers
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: yarn

- name: Install project dependencies
run: yarn install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true

- name: Install chromium
run: yarn playwright install --with-deps chromium

- name: Run tests
run: yarn test:browser --coverage

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/clover.xml

test-node:
name: Test Node
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: yarn

- name: Install project dependencies
run: yarn install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true

- name: Run tests
run: yarn test:node --coverage

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/clover.xml

test-saucelabs:
name: Test Saucelabs
runs-on: ubuntu-latest
concurrency: saucelabs
strategy:
max-parallel: 2
matrix:
browser:
- 'chrome-latest'
- 'chrome-latest-1'
- 'chrome-latest-2'
- 'chrome-80'
- 'firefox-latest'
- 'firefox-latest-1'
- 'firefox-latest-2'
- 'firefox-90'
# - 'safari-latest'
# - 'safari-latest-1'
- 'safari-14'
- 'edge-latest'
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: yarn

- name: Install project dependencies
run: yarn install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true

- name: Run tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
retry_on: error
command: yarn test:saucelabs --browser.name sauce:${{ matrix.browser }} --coverage
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/clover.xml
Loading

0 comments on commit e02d1e5

Please sign in to comment.