mirror of
https://github.com/IT4Change/boilerplate-frontend.git
synced 2025-12-13 07:35:53 +00:00
Merge pull request #4 from IT4Change/workflow-build
feat(workflow): build test workflow
This commit is contained in:
commit
3bb89e5b4d
3
.github/file-filters.yml
vendored
3
.github/file-filters.yml
vendored
@ -4,4 +4,7 @@ frontend-test-lint-code: &frontend-test-lint-code
|
||||
- '**/*'
|
||||
|
||||
frontend-test-unit-code: &frontend-test-unit-code
|
||||
- '**/*'
|
||||
|
||||
frontend-test-build-code: &frontend-test-build-code
|
||||
- '**/*'
|
||||
34
.github/workflows/test.build.code.yml
vendored
Normal file
34
.github/workflows/test.build.code.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: "test:build test code"
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
# only (but most important) job from this workflow required for pull requests
|
||||
# check results serve as run conditions for all other jobs here
|
||||
files-changed:
|
||||
name: Detect File Changes - frontend-test-build-code
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changes: ${{ steps.changes.outputs.frontend-test-build-code }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Check for frontend file changes
|
||||
uses: dorny/paths-filter@v2.11.1
|
||||
id: changes
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
filters: .github/file-filters.yml
|
||||
list-files: shell
|
||||
|
||||
build:
|
||||
if: needs.files-changed.outputs.changes == 'true'
|
||||
name: Build - Frontend
|
||||
needs: files-changed
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Frontend | Build
|
||||
run: npm install && npm run build
|
||||
4
.github/workflows/test.lint.code.yml
vendored
4
.github/workflows/test.lint.code.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
name: Detect File Changes - frontend-test-lint-code
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
frontend-test-lint-code: ${{ steps.changes.outputs.frontend-test-lint-code }}
|
||||
changes: ${{ steps.changes.outputs.frontend-test-lint-code }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
|
||||
@ -22,7 +22,7 @@ jobs:
|
||||
list-files: shell
|
||||
|
||||
lint:
|
||||
if: needs.files-changed.outputs.frontend-test-lint-code == 'true'
|
||||
if: needs.files-changed.outputs.changes == 'true'
|
||||
name: Lint - Frontend
|
||||
needs: files-changed
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
4
.github/workflows/test.lint.pr.yml
vendored
4
.github/workflows/test.lint.pr.yml
vendored
@ -7,8 +7,8 @@ on:
|
||||
- edited
|
||||
- synchronize
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
permissions: write-all
|
||||
# pull-requests: write
|
||||
|
||||
jobs:
|
||||
main:
|
||||
|
||||
4
.github/workflows/test.unit.code.yml
vendored
4
.github/workflows/test.unit.code.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
name: Detect File Changes - frontend-test-unit-code
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
frontend-test-unit-code: ${{ steps.changes.outputs.frontend-test-unit-code }}
|
||||
changes: ${{ steps.changes.outputs.frontend-test-unit-code }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
|
||||
@ -22,7 +22,7 @@ jobs:
|
||||
list-files: shell
|
||||
|
||||
unit:
|
||||
if: needs.files-changed.outputs.frontend-test-unit-code == 'true'
|
||||
if: needs.files-changed.outputs.changes == 'true'
|
||||
name: Unit - Frontend
|
||||
needs: files-changed
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
57
README.md
57
README.md
@ -29,28 +29,28 @@ This projects utilizes `storybook` to develop frontend components and `vuepress`
|
||||
|
||||
The following commands are available:
|
||||
|
||||
| Command | Description |
|
||||
|------------------------------|-------------------------------------------------|
|
||||
| `npm install` | Project setup |
|
||||
| `npm run build` | Compiles and minifies for production |
|
||||
| `npm run server:prod` | Runs productions server |
|
||||
| **Develop** | |
|
||||
| `npm run dev` | Compiles and hot-reloads for development |
|
||||
| `npm run server:dev` | Run development server |
|
||||
| **Test** | |
|
||||
| `npm run test:lint` | Run all linters |
|
||||
| `npm run test:lint:eslint` | Run linter eslint |
|
||||
| `npm run test:lint:remark` | Run linter remark |
|
||||
| `npm run test:unit` | Run all unit tests in watch mode |
|
||||
| `npm run test:unit:coverage` | Run all unit tests and generate coverage report |
|
||||
| `npm test` | Run all tests & linters |
|
||||
| **Storybook** | |
|
||||
| `npm run storybook` | Run Storybook |
|
||||
| `npm run storybook:build` | Build static storybook |
|
||||
| `npm run storybook:test` | Run tests against all storybook stories |
|
||||
| **Documentation** | |
|
||||
| `npm run docs:dev` | Run Documentation in development mode |
|
||||
| `npm run docs:build` | Build static documentation |
|
||||
| Command | Description |
|
||||
|----------------------------|-------------------------------------------------|
|
||||
| `npm install` | Project setup |
|
||||
| `npm run build` | Compiles and minifies for production |
|
||||
| `npm run server:prod` | Runs productions server |
|
||||
| **Develop** | |
|
||||
| `npm run dev` | Compiles and hot-reloads for development |
|
||||
| `npm run server:dev` | Run development server |
|
||||
| **Test** | |
|
||||
| `npm run test:lint` | Run all linters |
|
||||
| `npm run test:lint:eslint` | Run linter eslint |
|
||||
| `npm run test:lint:remark` | Run linter remark |
|
||||
| `npm run test:unit` | Run all unit tests and generate coverage report |
|
||||
| `npm run test:unit:dev` | Run all unit tests in watch mode |
|
||||
| `npm test` | Run all tests & linters |
|
||||
| **Storybook** | |
|
||||
| `npm run storybook` | Run Storybook |
|
||||
| `npm run storybook:build` | Build static storybook |
|
||||
| `npm run storybook:test` | Run tests against all storybook stories |
|
||||
| **Documentation** | |
|
||||
| `npm run docs:dev` | Run Documentation in development mode |
|
||||
| `npm run docs:build` | Build static documentation |
|
||||
|
||||
### Docker
|
||||
|
||||
@ -76,20 +76,11 @@ The following endpoints are provided given the right command is executed or all
|
||||
|
||||
## TODO
|
||||
|
||||
- [x] vite
|
||||
- [x] vike
|
||||
- [x] vue3
|
||||
- [x] vuetify
|
||||
- [x] pinia store
|
||||
- [x] storybook
|
||||
- [x] eslint
|
||||
- [x] vitest
|
||||
- [x] vue-i18n
|
||||
- [x] docker
|
||||
- [x] vuepress
|
||||
- [ ] figma
|
||||
- [ ] chromatic
|
||||
- [ ] github actions
|
||||
- [ ] lint locales
|
||||
- [ ] zähler -> pinia
|
||||
|
||||
## Known Problems
|
||||
|
||||
|
||||
@ -43,9 +43,9 @@
|
||||
"test:lint": "npm run test:lint:eslint && npm run test:lint:remark",
|
||||
"test:lint:eslint": "eslint --ext .vue,.ts,.tsx,.js,.jsx,.json,.yml,.yaml --max-warnings 0 --ignore-path .gitignore .",
|
||||
"test:lint:remark": "remark . --quiet --frail",
|
||||
"test:unit": "vitest",
|
||||
"test:unit:coverage": "npm run test:unit -- run --coverage",
|
||||
"test": "npm run test:lint && npm run test:unit:coverage",
|
||||
"test:unit": "npm run test:unit:dev -- run --coverage",
|
||||
"test:unit:dev": "vitest",
|
||||
"test": "npm run test:lint && npm run test:unit",
|
||||
"docs:dev": "vuepress dev .",
|
||||
"docs:build": "vuepress build ."
|
||||
},
|
||||
|
||||
@ -12,10 +12,10 @@ export default mergeConfig(
|
||||
coverage: {
|
||||
all: true,
|
||||
include: ['src/**/*.{js,jsx,ts,tsx,vue}'],
|
||||
lines: 5.81,
|
||||
lines: 5,
|
||||
functions: 0,
|
||||
branches: 11.11,
|
||||
statements: 5.81,
|
||||
branches: 10,
|
||||
statements: 5,
|
||||
// 100: true,
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user