mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-08 22:31:30 +01:00
chore: setup semantic-release
This commit is contained in:
parent
1b25007e77
commit
909352589f
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@ -1,5 +1,3 @@
|
|||||||
# For more information see: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: 'github-actions'
|
- package-ecosystem: 'github-actions'
|
||||||
|
7
.github/workflows/Divlo.yml
vendored
7
.github/workflows/Divlo.yml
vendored
@ -1,12 +1,10 @@
|
|||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
||||||
|
|
||||||
name: 'Divlo'
|
name: 'Divlo'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master, development]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [master, development]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
@ -28,6 +26,7 @@ jobs:
|
|||||||
path: '.npm'
|
path: '.npm'
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
||||||
|
- run: 'npm install --global npm@7'
|
||||||
- run: 'npm ci --cache .npm --prefer-offline'
|
- run: 'npm ci --cache .npm --prefer-offline'
|
||||||
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
|
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
|
||||||
- run: 'npm run lint:docker'
|
- run: 'npm run lint:docker'
|
||||||
|
34
.github/workflows/release.yml
vendored
Normal file
34
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: 'release'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: [ci]
|
||||||
|
branches: [master]
|
||||||
|
types:
|
||||||
|
- 'completed'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [14.x]
|
||||||
|
steps:
|
||||||
|
- uses: 'actions/checkout@v2'
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: 'actions/setup-node@v2.1.5'
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: 'Cache dependencies'
|
||||||
|
uses: 'actions/cache@v2.1.5'
|
||||||
|
with:
|
||||||
|
path: '.npm'
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
||||||
|
- run: 'npm install --global npm@7'
|
||||||
|
- run: 'npm ci --cache .npm --prefer-offline'
|
||||||
|
- run: 'npm run release'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
12
.releaserc.json
Normal file
12
.releaserc.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"release": {
|
||||||
|
"branches": ["master"]
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
["@semantic-release/commit-analyzer", {
|
||||||
|
"preset": "conventionalcommits"
|
||||||
|
}],
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
"@semantic-release/github"
|
||||||
|
]
|
||||||
|
}
|
25
jest.config.js
Normal file
25
jest.config.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
module.exports = {
|
||||||
|
roots: ['<rootDir>'],
|
||||||
|
transform: {
|
||||||
|
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest'
|
||||||
|
},
|
||||||
|
moduleDirectories: ['node_modules', './'],
|
||||||
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||||||
|
setupFilesAfterEnv: [
|
||||||
|
'@testing-library/jest-dom/extend-expect',
|
||||||
|
'@testing-library/react'
|
||||||
|
],
|
||||||
|
collectCoverage: true,
|
||||||
|
collectCoverageFrom: [
|
||||||
|
'**/*.{js,jsx,ts,tsx}',
|
||||||
|
'!**/*.d.ts',
|
||||||
|
'!**/.next/**',
|
||||||
|
'!**/node_modules/**',
|
||||||
|
'!**/next.config.js',
|
||||||
|
'!**/postcss.config.js',
|
||||||
|
'!**/workbox-*.js',
|
||||||
|
'!**/sw.js'
|
||||||
|
],
|
||||||
|
coverageDirectory: './coverage',
|
||||||
|
coverageReporters: ['text', 'cobertura']
|
||||||
|
}
|
7790
package-lock.json
generated
7790
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
48
package.json
48
package.json
@ -1,46 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "divlo",
|
"name": "divlo",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0-development",
|
||||||
"private": true,
|
"private": true,
|
||||||
"jest": {
|
"repository": {
|
||||||
"roots": [
|
"type": "git",
|
||||||
"<rootDir>"
|
"url": "https://github.com/Divlo/Divlo"
|
||||||
],
|
|
||||||
"transform": {
|
|
||||||
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest"
|
|
||||||
},
|
|
||||||
"moduleDirectories": [
|
|
||||||
"node_modules",
|
|
||||||
"./"
|
|
||||||
],
|
|
||||||
"moduleFileExtensions": [
|
|
||||||
"ts",
|
|
||||||
"tsx",
|
|
||||||
"js",
|
|
||||||
"jsx",
|
|
||||||
"json",
|
|
||||||
"node"
|
|
||||||
],
|
|
||||||
"setupFilesAfterEnv": [
|
|
||||||
"@testing-library/jest-dom/extend-expect",
|
|
||||||
"@testing-library/react"
|
|
||||||
],
|
|
||||||
"collectCoverage": true,
|
|
||||||
"collectCoverageFrom": [
|
|
||||||
"**/*.{js,jsx,ts,tsx}",
|
|
||||||
"!**/*.d.ts",
|
|
||||||
"!**/.next/**",
|
|
||||||
"!**/node_modules/**",
|
|
||||||
"!**/next.config.js",
|
|
||||||
"!**/postcss.config.js",
|
|
||||||
"!**/workbox-*.js",
|
|
||||||
"!**/sw.js"
|
|
||||||
],
|
|
||||||
"coverageDirectory": "./coverage",
|
|
||||||
"coverageReporters": [
|
|
||||||
"text",
|
|
||||||
"cobertura"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"ts-standard": {
|
"ts-standard": {
|
||||||
"ignore": [
|
"ignore": [
|
||||||
@ -70,6 +34,7 @@
|
|||||||
"lint:typescript": "ts-standard",
|
"lint:typescript": "ts-standard",
|
||||||
"lighthouse": "lhci autorun",
|
"lighthouse": "lhci autorun",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
|
"release": "semantic-release",
|
||||||
"postinstall": "husky install"
|
"postinstall": "husky install"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -116,7 +81,8 @@
|
|||||||
"markdownlint-cli": "0.27.1",
|
"markdownlint-cli": "0.27.1",
|
||||||
"node-mocks-http": "1.10.1",
|
"node-mocks-http": "1.10.1",
|
||||||
"postcss": "8.2.10",
|
"postcss": "8.2.10",
|
||||||
"sass": "1.32.10",
|
"sass": "1.32.11",
|
||||||
|
"semantic-release": "17.4.2",
|
||||||
"ts-standard": "10.0.0",
|
"ts-standard": "10.0.0",
|
||||||
"typescript": "4.2.4"
|
"typescript": "4.2.4"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user