Skip to content

Commit

Permalink
refactor: everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Uninen committed Nov 14, 2024
1 parent 7b86fdf commit 2a1d2b6
Show file tree
Hide file tree
Showing 24 changed files with 2,184 additions and 1,308 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
36 changes: 25 additions & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Test
name: Test

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/vitest-coverage-report-action@v2.7.0
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
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ jobs:
publish:
runs-on: ubuntu-latest
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 +45,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.

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"
}
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @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.

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

- CI: tag and release automatically on publish.
Expand Down
168 changes: 0 additions & 168 deletions build/rollup.config.js

This file was deleted.

Loading

0 comments on commit 2a1d2b6

Please sign in to comment.