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

v6 #205

Closed
wants to merge 276 commits into from
Closed

v6 #205

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
854880f
style: update size with border in calendar
motss May 26, 2021
b99105d
style: update year grid button style on hover, focus, today, selected
motss May 26, 2021
e51aa08
style: update styling in date picker
motss May 26, 2021
c253e9e
refactor: update focus logic in year grid
motss May 26, 2021
8ecbf25
refactor: improve keyboard navigation in year grid
motss May 26, 2021
82c2be8
refactor: remove unused element
motss May 26, 2021
2276524
style: minor update
motss May 26, 2021
3f1445e
fix: improve keyboard support and various bug fixes on navigation
motss May 27, 2021
dcc4d69
refactor: optimize code
motss May 27, 2021
0426730
chore: update dependencies
motss May 28, 2021
f94bc4c
chore: update dependencies
motss May 28, 2021
4cda306
refactor: update logic rendering navigation buttons
motss May 28, 2021
2e155d6
chore: minor update
motss May 28, 2021
24588b6
chore: update dependencies
motss May 28, 2021
ec24740
refactor: minor update to support valueAsDate and valueAsNumber
motss May 29, 2021
28771a7
refactor: use KeyboardEvent.key and add disabled state
motss May 29, 2021
24ae97f
chore: remove whitespace in swipe-tracker folder name
motss May 29, 2021
f07c919
refactor: add focusElement() helper
motss May 30, 2021
b61f3f0
fix: fix selected date update logic
motss May 30, 2021
0ed6a5a
chore: update ci scripts
motss May 30, 2021
5fd640e
chore: remove --no when running npm x
motss May 30, 2021
615d4fb
chore: commit husky script
motss Jun 4, 2021
190167d
chore: update dependencies
motss Jun 26, 2021
952a7ed
chore: update dependencies
motss Sep 12, 2021
9a2ff8d
test: try to add tests for helpers
motss Sep 12, 2021
7163b4e
chore(ci): update CI scripts
motss Sep 12, 2021
98e111b
chore: update dependencies
motss Sep 14, 2021
ae1d5cd
test: add tests for elements
motss Sep 14, 2021
393ad47
chore: update dependencies
motss Sep 15, 2021
4766348
chore: add post-commit husky hook
motss Sep 15, 2021
2fe1b13
chore: update script
motss Sep 15, 2021
4a617f5
test: add more tests and remove uvu
motss Sep 16, 2021
14fb289
ci: always use ubuntu
motss Sep 16, 2021
45ae3ac
chore: update dependencies
motss Sep 17, 2021
e0c70d5
test: add tests for focusElement
motss Sep 17, 2021
dc95435
test: add tests for isInCurrentMonth
motss Sep 17, 2021
5662c0e
refactor: remove redundant code
motss Sep 17, 2021
e02e768
refactor: minor update
motss Sep 17, 2021
bf371e6
test: add tests for nullishAttributeConverter
motss Sep 17, 2021
c7ee8f9
test: add tests for splitString
motss Sep 18, 2021
23e5479
test: add tests for toClosestTarget
motss Sep 18, 2021
3f21db2
test: add tests for toDateRange
motss Sep 18, 2021
f16c64d
test: add tests for toDateString
motss Sep 18, 2021
e7b8179
test: add tests for toFormatters
motss Sep 18, 2021
d9eec02
test: add tests for toMultiCalendars
motss Sep 18, 2021
18ea669
test: add tests for toNextSelectableDate
motss Sep 18, 2021
c4f4a85
chore: update dependencies
motss Sep 19, 2021
bb649e5
test: add test for toResolvedDate
motss Sep 19, 2021
56c8404
test: add tests for toYearList, fix toDateRange to return number of days
motss Sep 19, 2021
47a3a3b
refactor: rename to toDayDiffInclusive with minor fix
motss Sep 20, 2021
c4fc0a9
test: update tests
motss Sep 20, 2021
dbf97fa
chore: update dependencies
motss Sep 20, 2021
d06d0b8
test: add tests for toNextSelectedDate
motss Sep 20, 2021
faf72eb
fix(ci): skip running prepare and postinstall scripts in CI
motss Sep 20, 2021
d131409
fix(ci): run shellcheck on npm scripts
motss Sep 20, 2021
b1ee65c
chore(ci): update npm scripts
motss Sep 20, 2021
488203b
chore: update dependencies
motss Sep 26, 2021
bcd2470
chore: update dependencies and update imports
motss Sep 27, 2021
a7353b5
chore: update dependencies
motss Sep 29, 2021
4af280b
test: add tests for toNextSelectedYear with minor improvements
motss Sep 29, 2021
d122c12
chore: update dependencies
motss Oct 1, 2021
e16a139
test: add tests for AppYearGrid
motss Oct 1, 2021
d69fa5f
chore: update dependencies
motss Oct 2, 2021
4188c5f
refactor: minor update
motss Oct 2, 2021
232e276
test: add tests for AppMonthCalendar
motss Oct 2, 2021
af2ae71
chore(ci): trying to cache node_modules
motss Oct 2, 2021
2917363
chore(ci): trying to install dependencies with cache
motss Oct 2, 2021
5f7b707
chore(ci): trying to cache dependencies
motss Oct 2, 2021
eb2ca4b
chore: update dependencies
motss Oct 3, 2021
c5d35b0
chore: rename to actual web component's name
motss Oct 3, 2021
9e49ba5
chore: rename element names
motss Oct 3, 2021
e120bb9
test: add tests for AppDatePicker
motss Oct 3, 2021
49d3eac
feat: add clampValue with tests
motss Oct 3, 2021
1179798
refactor: refactor dateValidator, toResolvedDate then update tests
motss Oct 3, 2021
14915a0
refactor: refactor min, max, value with clamping and update tests
motss Oct 3, 2021
5829558
chore: update dependencies
motss Oct 18, 2021
34e07cd
test: improve tests and fix date range behavior
motss Oct 18, 2021
3411afb
test: update tests due to code change
motss Oct 18, 2021
5e77440
chore: update dependencies
motss Oct 18, 2021
46fb626
chore: cleanup
motss Oct 18, 2021
6858944
chore: cleanup
motss Oct 18, 2021
d4122bd
chore: update package.json
motss Oct 18, 2021
ab32816
chore: update dependencies
motss Nov 5, 2021
71eeb1a
feat: implement DatePickerInputSurface
motss Nov 6, 2021
cb1f081
chore: cleanup
motss Nov 6, 2021
0812cae
refactor: minor update
motss Nov 6, 2021
0c60ee9
style: add overscroll-behavior: contain for year grid view
motss Nov 6, 2021
970c2b3
refactor: improve label
motss Nov 6, 2021
db8bee8
refactor(husky): improve hook
motss Nov 6, 2021
827b063
refactor(datePicker): refactor for better customization and a11y
motss Nov 6, 2021
873cd06
refactor: minor rename
motss Nov 6, 2021
c785fb7
feat: implement DatePickerInput
motss Nov 6, 2021
d4321bf
refactor: improve code
motss Nov 6, 2021
ff07461
test: update tests
motss Nov 6, 2021
ed80808
refactor: refactor code around keyboard support and typings
motss Nov 7, 2021
61c2347
test: update tests
motss Nov 7, 2021
e51136e
refactor: improve keyboard support in DatePickerInput
motss Nov 7, 2021
ae387ac
refactor: minor update
motss Nov 7, 2021
5b418eb
refactor: minor update and cleanup to improve test coverage
motss Nov 7, 2021
6fc3476
chore: update dependencies
motss Nov 9, 2021
cca8df7
chore: update dependencies
motss Nov 11, 2021
95e9d55
6.0.0-rc.0
motss Nov 11, 2021
b0aa13f
refactor: update config
motss Nov 11, 2021
4907681
6.0.0-rc.1
motss Nov 11, 2021
0c2a7ba
chore: update dependencies
motss Nov 13, 2021
b4c6b79
chore: update package.json
motss Nov 14, 2021
52d5b7a
6.0.0-rc.2
motss Nov 14, 2021
c411e13
refactor: implement .fire() to replace dispatchCustomEvent helper
motss Nov 14, 2021
4d41bba
feat: implement AppDatePickerDialog
motss Nov 14, 2021
a0b49b9
chore: update dependencies
motss Nov 20, 2021
3951f86
fix: fix @material/mwc-dialog closes unexpectedly for all Enter keys
motss Nov 20, 2021
d5eed5d
test: improve tests
motss Nov 20, 2021
8f11e49
test: add tests for AppDatePickerInputSurface
motss Nov 21, 2021
a6d940e
test: add tests for AppDatePickerInput
motss Nov 21, 2021
220abd0
test: fix test failing in Firefox due to a bug
motss Nov 21, 2021
c8f2e6e
chore: update dependencies
motss Nov 26, 2021
a11a61a
test: add tests for AppDatePickerDialog
motss Nov 26, 2021
b4609b6
refactor: minor update in date picker input
motss Nov 26, 2021
d706c0c
refactor: support Escape key to close DatePickerInput
motss Nov 26, 2021
db68ed4
chore: update dependencies
motss Nov 27, 2021
c46f8d1
feat: add valueAsDate and valueAsNumber in DatePickerInput
motss Nov 27, 2021
3239293
chore: add nano-staged to fix all linting issues in staged changed
motss Nov 27, 2021
5a10623
feat: close picker when focus is outside of DatePickerInput
motss Nov 27, 2021
2c5caef
6.0.0-rc.3
motss Nov 27, 2021
e493bfb
feat: implement DatePickerDialogDialog for extensible slot for input
motss Nov 28, 2021
1f92479
test: add tests for warnUndefinedElement with hanbi for stubbing methods
motss Nov 28, 2021
6a0d7e7
chore: migrate to use simple-git-hooks
motss Dec 3, 2021
44fe450
chore: update dependencies
motss Dec 5, 2021
5eaba03
chore: minor update
motss Dec 5, 2021
30aee3e
chore: sort package.json
motss Dec 5, 2021
6685f4a
test: fix failed tests on optional max and always override min and max
motss Dec 5, 2021
f449d2a
test: fix tests after updating DatePickerDialogBase to use ShadowDOM
motss Dec 5, 2021
5f57e54
chore: update dependencies
motss Dec 13, 2021
b3a3a53
test: try to fix test
motss Dec 13, 2021
d8f219e
chore: update dependencies
motss Dec 14, 2021
67fc88b
refactor: fixing all FIXMEs
motss Dec 14, 2021
dd6785e
6.0.0-rc.4
motss Dec 14, 2021
d5ac511
chore: update dependencies
motss Dec 14, 2021
c4b8858
chore: cleanup and update README
motss Jan 10, 2022
8b700c4
chore: update dependencies
motss Jan 10, 2022
cda94d0
6.0.0-rc.5
motss Jan 10, 2022
07211b2
build: add date-picker-dialog to exports
motss Jan 10, 2022
ca0ea87
6.0.0-rc.6
motss Jan 10, 2022
a09ab94
build: add missing files
motss Jan 10, 2022
16433a1
6.0.0-rc.7
motss Jan 10, 2022
b68537d
refactor: simplify CSS Custom Properties
motss Jan 22, 2022
1de4cf6
chore: update dependencies
motss Jan 22, 2022
cfe4ff7
6.0.0-rc.8
motss Jan 22, 2022
b8cb8c8
build: update script to only run in package's working directory
motss Jan 22, 2022
463ecfe
6.0.0-rc.9
motss Jan 22, 2022
06221be
build: update script
motss Jan 22, 2022
019a3a2
6.0.0-rc.10
motss Jan 22, 2022
26ea3c6
build: update script again
motss Jan 22, 2022
62c6397
6.0.0-rc.11
motss Jan 22, 2022
fd2f5b3
refactor: improve stylings for better customization
motss Jan 23, 2022
105da7c
refactor: try to standardize stylings with MD3
motss Jan 23, 2022
911aadc
refactor: optimize dialog elements
motss Jan 25, 2022
79ceabb
chore: update dependencies and update import
motss Jan 25, 2022
081c8f7
feat: expose scrim color
motss Jan 25, 2022
376c98b
feat: datePicker now always opens in calendar view in DatePickerInput
motss Jan 25, 2022
a462fbe
feat: datePickerDialog now re-opens in calendar view
motss Jan 25, 2022
ef21496
chore: update dependencies
motss Jan 30, 2022
dd5c413
refactor: refactor styling in datePickerInput
motss Jan 30, 2022
c4edc35
refactor: refactor in base styling
motss Jan 30, 2022
a0633c2
fix: use live() to ensure datePickerInput updates to selected date
motss Jan 30, 2022
8425a1f
6.0.0-rc.12
motss Jan 30, 2022
efdf1e7
ci: improve CI
motss Feb 4, 2022
2bd0dc5
ci: use local cache for npx
motss Feb 4, 2022
f3459c4
ci: improve CI
motss Feb 6, 2022
0925640
ci: simple-git-hooks fix
motss Feb 6, 2022
0d6b36b
chore: update dependencies
motss Feb 6, 2022
c9b00c1
chore: update dependencies
motss Feb 6, 2022
32d48d3
build: minor update
motss Feb 6, 2022
f77778d
6.0.0-rc.13
motss Feb 6, 2022
c8b9c43
refactor: major refactoring in stylings to be compatible with MD2
motss Feb 12, 2022
92848c9
chore: update dependencies and update typings
motss Feb 12, 2022
fa3e059
feat: use title to replace MD tooltip for all hover-able labels
motss Feb 13, 2022
615f996
fix: fix a rendering bug in mwc-icon-button's ripple in DatePickerInput
motss Feb 13, 2022
f925d55
ci: debug CI
motss Feb 13, 2022
46f11ca
ci: debug CI
motss Feb 13, 2022
c4fbde6
ci: debug CI
motss Feb 13, 2022
40aec68
ci: update step for tests with coverage
motss Feb 13, 2022
cc994ce
refactor: use .updated() to always update scrolling in YearGrid
motss Feb 13, 2022
2dbfe1b
test: add tests for title in YearGrid, update ESLint to enforce semi
motss Feb 13, 2022
f622efa
chore: remove .only in tests
motss Feb 13, 2022
ac31caf
refactor: support shortWeekLabel, weekLabel, weekNumberTemplate
motss Feb 13, 2022
1292133
chore: update dependencies
motss Feb 19, 2022
62e76ac
test: add tests for MonthCalendar
motss Feb 19, 2022
c32d892
test: add tests in YearGrid
motss Feb 19, 2022
201aaa1
test: add tests in DatePickerDialog, fix valueAs* not updated with value
motss Feb 19, 2022
29892b5
test: add tests in DatePicker, remove unused inline property
motss Feb 19, 2022
5dbe14d
build: lint without fix
motss Feb 19, 2022
53a836e
build: revert auto fix in linting
motss Feb 19, 2022
be31fc1
build: try git add after auto fix in linting
motss Feb 19, 2022
acbdd73
refactor: fix linting
motss Feb 19, 2022
6812bf6
test: refactor typings in tests
motss Feb 19, 2022
51eb60f
ci: use Playwright CLI instead of Github Action
motss Feb 20, 2022
6f18ca2
feat: implement IconButton to overcome a rendering bug in Ripple
motss Feb 20, 2022
b3c32f2
feat: implement .lazyLoad in DatePickerInput
motss Feb 20, 2022
c201c14
test: update tests due to lazy loading dependencies
motss Feb 20, 2022
4f212ae
test: update tests
motss Feb 20, 2022
0f106c5
ci: revert to Playwright Github Action
motss Feb 20, 2022
e503ba2
ci: use Playwright CLI
motss Feb 21, 2022
983a236
chore: update dependencies, remove unused uses: in CI
motss Feb 21, 2022
21c43a1
6.0.0-rc.14
motss Feb 21, 2022
5cf98da
build: add icon-button/*
motss Feb 21, 2022
6d4a43c
ci: remove Playwright setup
motss Feb 21, 2022
86aa7d6
test: ignore LoC that causes code coverage to fail sometimes
motss Feb 21, 2022
7f52c6f
ci: trying to install-deps with installed Playwright
motss Feb 21, 2022
bfde3c5
6.0.0-rc.15
motss Feb 21, 2022
61b4d44
chore: update dependencies
motss Feb 26, 2022
1123f8e
fix: fix datePicker renders when inputSurface is not loaded
motss Feb 26, 2022
6bf625b
6.0.0-rc.16
motss Feb 26, 2022
050447b
test: update tests, fix datePicker opens with a clean slate in input
motss Feb 26, 2022
556e8ed
6.0.0-rc.17
motss Feb 26, 2022
d260d88
refactor: minor update to always use current date unless selected
motss Feb 27, 2022
36374b2
test: add and update tests
motss Feb 27, 2022
d016f97
refactor: update dialog to always re-render datePicker with clean slate
motss Feb 27, 2022
aac5a32
6.0.0-rc.18
motss Feb 27, 2022
0410aef
build: trying to adopt changesets
motss Mar 6, 2022
a317814
build: convert all bash scripts to shell scripts
motss Mar 8, 2022
a3e6f69
chore: update dependencies
motss Mar 9, 2022
b249e4f
ci: update scripts
motss Mar 9, 2022
13e5209
fix: fix stylings not using the correct CSS Variables
motss Mar 9, 2022
97a058d
ci: trying to improve CI
motss Mar 9, 2022
46a4848
ci: improve setting ENV in CI
motss Mar 9, 2022
70534f8
feat: add script to generate changelog
motss Mar 10, 2022
4206b7c
build: trying to update changelog with new commit message
motss Mar 10, 2022
24c79ab
chore(changelog): update changelog generators
motss Mar 13, 2022
f462721
docs: add docs for AppDatePicker
motss Mar 13, 2022
b8968d6
docs: add docs for AppDatePickerDialog
motss Mar 13, 2022
f531c50
docs: add docs for AppDatePickerInput
motss Mar 13, 2022
83c06d5
docs: fix broken URLs in docs
motss Mar 13, 2022
cfa6652
ci: update CI script
motss Mar 18, 2022
30dc8a1
feat: integrate @reallyland/tools
motss Mar 20, 2022
969d1ac
feat: add today, toyear parts, and exportparts for calendar and yearGrid
motss Mar 21, 2022
c8b8dfa
ci: update CI script
motss Mar 21, 2022
6460820
chore(release): 6.0.0-rc.19 :tada:
motss Mar 21, 2022
4b1959d
ci: update CI scripts
motss Mar 21, 2022
2fa05d2
chore(release): 6.0.0-rc.20 :tada:
motss Mar 21, 2022
46cbf3a
ci: improve CI scripts
motss Mar 21, 2022
64ff901
ci: echo group name
motss Mar 21, 2022
7ee2066
chore: update dependencies
motss Mar 26, 2022
c2ee020
chore: remove unused comments
motss Mar 26, 2022
102600b
refactor(a11y): use :focus-visible instead of :focus
motss Mar 26, 2022
c781463
chore: update dependencies
motss Mar 26, 2022
6b310ed
chore(release): 6.0.0-rc.21 :tada:
motss Mar 26, 2022
0ee4e3f
refactor: rename toyearLabel, update docs, fix stylings, minor cleanup
motss Mar 26, 2022
4287782
refactor: minor update
motss Mar 26, 2022
20462d9
chore(release): 6.0.0-rc.22 :tada:
motss Mar 26, 2022
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
12 changes: 4 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org
# https://editorconfig.org

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2
indent_style = space

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
trim_trailing_whitespace = true
2 changes: 0 additions & 2 deletions .env.sample

This file was deleted.

5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Automatically normalize line endings for all text-based files
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
# https://git-scm.com/docs/gitattributes#_end_of_line_conversion
* text=auto

# For the following file types, normalize line endings to LF on
Expand All @@ -8,10 +8,13 @@
# for example, after the build script is run)
.* text eol=lf
*.css text eol=lf
*.dart text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.jsx text eol=lf
*.md text eol=lf
*.rs text eol=lf
*.scss text eol=lf
*.sh text eol=lf
*.ts text eol=lf
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @motss
105 changes: 105 additions & 0 deletions .github/workflows/ci-helpers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: ci-helpers

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
branches:
- '*'
tags-ignore:
- '*'

defaults:
run:
shell: bash

env:
COVERAGE: false
IS_UBUNTU: false
NODE_VERSION: v0.0.0
NPM_CACHE_DIR: ~/.npm
NPM_VERSION: 0.0.0
TEST_HELPERS: true

jobs:
test:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'docs:') && !contains(github.event.head_commit.message, 'chore(release)')"
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
env:
IS_UBUNTU: ${{ contains(matrix.os, 'ubuntu') }}
name: ${{ matrix.os }} ${{ matrix.target }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
matrix:
os: [ubuntu-latest]
target: [16.x]

steps:
- name: Checkout
uses: actions/checkout@v2

# - name: Setup node@${{ matrix.target }}
# uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.target }}

# - name: Install latest npm
# run: |
# npm i -g npm@latest

- name: List versions
run: |
echo "NODE_VERSION=$(node -v)" >> $GITHUB_ENV
echo "NPM_CACHE_DIR=$(npm config get cache)" >> $GITHUB_ENV
echo "NPM_VERSION=$(npm -v)" >> $GITHUB_ENV

echo "${{ github.workflow }}-${{ github.ref || github.run_id }}"
pwd
ls -la
which npm

- name: Cache dependencies
id: npm-cache
uses: actions/cache@v2
with:
# See this glob workaround at https://github.com/actions/toolkit/issues/713.
path: |
${{ env.NPM_CACHE_DIR }}/*
!${{ env.NPM_CACHE_DIR }}/_npx
key: ${{ matrix.os }}-node-${{ env.NODE_VERSION }}-npm-${{ env.NPM_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-node-${{ env.NODE_VERSION }}-npm-${{ env.NPM_VERSION }}

- name: Install dependencies
run: |
npm ci

- name: Lint
run: |
npm run lint:build

- name: Test
if: env.IS_UBUNTU == 'false'
run: |
npm run wtr

- name: Test with coverage
if: env.IS_UBUNTU != 'false'
run: |
npm run wtr
env:
COVERAGE: true

- name: Upload coverage to codecov
if: env.IS_UBUNTU != 'false' && success()
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: unit_tests_helpers
100 changes: 67 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,65 +12,99 @@ on:
tags-ignore:
- '*'

defaults:
run:
shell: bash

env:
CI_SKIP: false
COVERAGE: false
IS_UBUNTU: false
NODE_VERSION: v0.0.0
NPM_CACHE_DIR: ~/.npm
NPM_VERSION: 0.0.0

jobs:
test:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, 'doc:')"
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'docs:') && !contains(github.event.head_commit.message, 'chore(release)')"
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
env:
IS_UBUNTU: ${{ contains(matrix.os, 'ubuntu') }}
name: ${{ matrix.os }} ${{ matrix.target }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
target: [14.x]
timeout-minutes: 120
os: [ubuntu-latest]
target: [16.x]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Git log
run: |
if [ -n "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+')" ]; then
echo "CI_SKIP=true" >> $GITHUB_ENV
fi
# - name: Setup node@${{ matrix.target }}
# uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.target }}

- name: Setup node@${{ matrix.target }}
if: "env.CI_SKIP == 'false'"
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.target }}
# - name: Install latest npm
# run: |
# npm i -g npm@latest

- name: List versions
if: "env.CI_SKIP == 'false'"
continue-on-error: true
run: |
node -v && npm version && which npm && pwd && npx envinfo
echo "NODE_VERSION=$(node -v)" >> $GITHUB_ENV
echo "NPM_CACHE_DIR=$(npm config get cache)" >> $GITHUB_ENV
echo "NPM_VERSION=$(npm -v)" >> $GITHUB_ENV

echo "${{ github.workflow }}-${{ github.ref || github.run_id }}"
pwd
ls -la
which npm
# npm x -y -- envinfo@latest

- name: Cache dependencies
id: npm-cache
uses: actions/cache@v2
with:
# See this glob workaround at https://github.com/actions/toolkit/issues/713.
path: |
${{ env.NPM_CACHE_DIR }}/*
!${{ env.NPM_CACHE_DIR }}/_npx
key: ${{ matrix.os }}-node-${{ env.NODE_VERSION }}-npm-${{ env.NPM_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-node-${{ env.NODE_VERSION }}-npm-${{ env.NPM_VERSION }}

- name: Install dependencies
if: "env.CI_SKIP == 'false'"
run: |
npm ci --quiet
npm ci
sh $(npm root)/@reallyland/tools/list-npx-cache.sh

- name: Lint
if: "env.CI_SKIP == 'false'"
- name: Setup Playwright
run: |
npm run lint
$(npm bin)/playwright install-deps

- name: Build
if: "env.CI_SKIP == 'false'"
- name: Lint
run: |
npm run build:test && npm run build:config
npm run lint:build

- name: Check build
if: "env.CI_SKIP == 'false'"
shell: bash
- name: Test
if: env.IS_UBUNTU == 'false'
run: |
pwd && ls -la
npm run wtr

- name: Run Test
if: "env.CI_SKIP == 'false'"
- name: Test with coverage
if: env.IS_UBUNTU != 'false'
run: |
npm run test:dev
npm run wtr
env:
COVERAGE: true

- name: Upload coverage to codecov
if: env.IS_UBUNTU != 'false' && success()
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: unit_tests
57 changes: 35 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,66 @@ on:
tags:
- '*'

defaults:
run:
shell: bash

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_VERSION: v0.0.0
NPM_CACHE_DIR: ~/.npm
NPM_VERSION: 0.0.0

jobs:
build:
name: ${{ matrix.os }} ${{ matrix.target }}
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
matrix:
os: [ubuntu-latest]
target: [14.x]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup node@${{ matrix.target }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.target }}
registry-url: 'https://registry.npmjs.org'

- name: List versions
run: |
node -v && npm -v && which npm
echo "NODE_VERSION=$(node -v)" >> $GITHUB_ENV
echo "NPM_CACHE_DIR=$(npm config get cache)" >> $GITHUB_ENV
echo "NPM_VERSION=$(npm -v)" >> $GITHUB_ENV
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc

pwd
ls -la
which npm
npm config ls -l

- name: Cache dependencies
id: npm-cache
uses: actions/cache@v2
with:
# See this glob workaround at https://github.com/actions/toolkit/issues/713.
path: |
${{ env.NPM_CACHE_DIR }}/*
!${{ env.NPM_CACHE_DIR }}/_npx
key: ${{ matrix.os }}-node-${{ env.NODE_VERSION }}-npm-${{ env.NPM_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-node-${{ env.NODE_VERSION }}-npm-${{ env.NPM_VERSION }}

- name: Install dependencies
run: |
npm ci --quiet
npm ci

- name: Publish to npm (Prerelease)
if: contains(github.ref, '-') == true
if: contains(github.ref, '-rc') == true || contains(github.ref, '-') == true
run: |
npm config list
npm publish . --tag=next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to npm
if: contains(github.ref, '-') == false
if: contains(github.ref, '-rc') == false && contains(github.ref, '-') == false
run: |
npm config list
npm publish .
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# See https://github.com/actions/setup-node/issues/73.
# - name: Setup node@${{ matrix.target }}
Expand All @@ -64,13 +81,9 @@ jobs:
# run: |
# npm config list
# npm publish . --tag=next
# env:
# NODE_AUTH_TOKEN: ${{github.token}}

# - name: Publish to GPR (Prerelease)
# if: success() && contains(github.ref, '-') == false
# run: |
# npm config list
# npm publish .
# env:
# NODE_AUTH_TOKEN: ${{github.token}}
Loading