Skip to content

Commit

Permalink
chore: bump deps (#56)
Browse files Browse the repository at this point in the history
* chore: fix build

* refactor: everything

* chore: update renovate config

* fix: vitests

* fix: vitest

* fix: tweak tests

* ci: only release after tests pass
  • Loading branch information
Uninen authored Nov 14, 2024
1 parent ecdaa94 commit c01c10f
Show file tree
Hide file tree
Showing 27 changed files with 3,153 additions and 2,033 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{html}]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
25 changes: 7 additions & 18 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
{
"extends": [
"config:base",
"group:all",
"schedule:weekly",
":widenPeerDependencies"
],
"enabledManagers": [
"npm"
],
"extends": ["config:recommended", "group:all", "schedule:weekly", ":widenPeerDependencies"],
"enabledManagers": ["npm"],
"packageRules": [
{
"matchManagers": [
"npm"
],
"matchManagers": ["npm"],
"automerge": true,
"stabilityDays": 2
"minimumReleaseAge": "2 days"
},
{
"matchPackagePatterns": [
"npm"
],
"rangeStrategy": "auto"
"rangeStrategy": "auto",
"matchPackageNames": ["/npm/"]
}
],
"timezone": "Europe/Helsinki",
"dependencyDashboard": true
}
}
22 changes: 14 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
on:
push:
workflow_run:
workflows: ['Tests']
types:
- completed
branches:
- main
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/checkout@v4.2.2
- uses: pnpm/action-setup@v2.4.1
with:
version: 8
version: 9
run_install: false
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4.1.0
with:
node-version: '18'
node-version: 22

- run: |
pnpm i --frozen-lockfile
pnpm build
- uses: JS-DevTools/npm-publish@v2
- uses: JS-DevTools/npm-publish@v3.1.1
id: publish
with:
token: ${{ secrets.NPM_TOKEN }}
Expand All @@ -45,7 +51,7 @@ jobs:
run: echo "${{ steps.changelog.outputs.changelog }}"

- name: Create Release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@v1.14.0
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/test.yml

This file was deleted.

36 changes: 25 additions & 11 deletions .github/workflows/e2e.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Test
name: Tests

on:
push:
Expand All @@ -9,52 +9,66 @@ on:
- 'pnpm-lock.yaml'
- 'src/**/*.ts'
- 'src/**/*.vue'
- 'tests/e2e/**/*.spec.ts'
- 'tests/**/*.ts'
pull_request:
paths:
- '.github/workflows/e2e.yml'
- 'pnpm-lock.yaml'
- 'src/**/*.ts'
- 'src/**/*.vue'
- 'tests/e2e/**/*.spec.ts'
- 'tests/**/*.ts'
workflow_dispatch:

concurrency:
group: e2e-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: tests-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
e2e-tests:
runs-on: ubuntu-latest

env:
CI: 1
DEBUG: 0
PLAYWRIGHT_BROWSERS_PATH: 0

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4.2.2
- uses: actions/cache@v4.1.2
with:
path: /home/runner/.local/share/pnpm/store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v2.4.1
with:
version: 8
version: 9
run_install: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4.1.0
with:
node-version: 18
node-version: 22
cache: 'pnpm'

- name: Build front
run: pnpm build

- name: Test front
run: pnpm coverage

- name: Component Coverage
uses: davelosert/[email protected]
if: ${{ always() }}
with:
working-directory: ./
vite-config-path: ./vite.config.ts

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

- name: Run e2e tests
run: pnpm test:ci-e2e

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.4.3
if: always()
with:
name: playwright-report
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
dist
*.tsbuildinfo

/tests/e2e/videos/
/tests/e2e/screenshots/
Expand Down
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 120,
"arrowParens": "avoid",
"trailingComma": "es5"
}
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @slipmatio/ui

### 0.2.0 - (2024-11-14)

- Fix: make sure button text doesn't wrap.
- Chore: upgraded Vite and Renovate configs.
- Chore: bumped deps.
- CI: only release after tests pass.

### 0.1.2 - (2023-07-17)

- CI: tag and release automatically on publish.
Expand Down
Loading

0 comments on commit c01c10f

Please sign in to comment.