mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-12-08 00:44:30 +01:00
ci: only one workflow (Divlo)
This commit is contained in:
parent
e0bc1fed49
commit
9b8102cbdc
106
.github/workflows/Divlo.yml
vendored
106
.github/workflows/Divlo.yml
vendored
@ -7,18 +7,35 @@ on:
|
|||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
analyze:
|
||||||
|
name: 'Analyze'
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [14.x]
|
language: ['javascript']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: 'actions/checkout@v2.3.4'
|
- uses: 'actions/checkout@v2.3.4'
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: 'Initialize CodeQL'
|
||||||
|
uses: 'github/codeql-action/init@v1'
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
|
- name: 'Perform CodeQL Analysis'
|
||||||
|
uses: 'github/codeql-action/analyze@v1'
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
- uses: 'actions/checkout@v2.3.4'
|
||||||
|
|
||||||
|
- name: 'Use Node.js'
|
||||||
uses: 'actions/setup-node@v2.1.5'
|
uses: 'actions/setup-node@v2.1.5'
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: '14.x'
|
||||||
|
|
||||||
- name: 'Cache dependencies'
|
- name: 'Cache dependencies'
|
||||||
uses: 'actions/cache@v2.1.6'
|
uses: 'actions/cache@v2.1.6'
|
||||||
@ -26,13 +43,84 @@ 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'
|
- name: 'Install'
|
||||||
- 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'
|
||||||
- run: 'npm run lint:editorconfig'
|
- run: 'npm run lint:editorconfig'
|
||||||
- run: 'npm run lint:markdown'
|
- run: 'npm run lint:markdown'
|
||||||
- run: 'npm run lint:typescript'
|
- run: 'npm run lint:typescript'
|
||||||
- run: 'npm run build'
|
|
||||||
- run: 'npm run lighthouse'
|
build:
|
||||||
- run: 'npm run test'
|
runs-on: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
- uses: 'actions/checkout@v2.3.4'
|
||||||
|
|
||||||
|
- name: 'Use Node.js'
|
||||||
|
uses: 'actions/setup-node@v2.1.5'
|
||||||
|
with:
|
||||||
|
node-version: '14.x'
|
||||||
|
|
||||||
|
- name: 'Cache dependencies'
|
||||||
|
uses: 'actions/cache@v2.1.6'
|
||||||
|
with:
|
||||||
|
path: '.npm'
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
||||||
|
- name: 'Install'
|
||||||
|
run: 'npm ci --cache .npm --prefer-offline'
|
||||||
|
|
||||||
|
- name: 'Build'
|
||||||
|
run: 'npm run build'
|
||||||
|
|
||||||
|
- name: 'Lighthouse'
|
||||||
|
run: 'npm run lighthouse'
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
- uses: 'actions/checkout@v2.3.4'
|
||||||
|
|
||||||
|
- name: 'Use Node.js'
|
||||||
|
uses: 'actions/setup-node@v2.1.5'
|
||||||
|
with:
|
||||||
|
node-version: '14.x'
|
||||||
|
|
||||||
|
- name: 'Cache dependencies'
|
||||||
|
uses: 'actions/cache@v2.1.6'
|
||||||
|
with:
|
||||||
|
path: '.npm'
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
||||||
|
- name: 'Install'
|
||||||
|
run: 'npm ci --cache .npm --prefer-offline'
|
||||||
|
|
||||||
|
- name: 'Test'
|
||||||
|
run: 'npm run test'
|
||||||
|
|
||||||
|
release:
|
||||||
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||||
|
needs: [analyze, lint, build, test]
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
- uses: 'actions/checkout@v2.3.4'
|
||||||
|
|
||||||
|
- name: 'Use Node.js'
|
||||||
|
uses: 'actions/setup-node@v2.1.5'
|
||||||
|
with:
|
||||||
|
node-version: '14.x'
|
||||||
|
|
||||||
|
- name: 'Cache dependencies'
|
||||||
|
uses: 'actions/cache@v2.1.6'
|
||||||
|
with:
|
||||||
|
path: '.npm'
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
||||||
|
- name: 'Install'
|
||||||
|
run: 'npm ci --cache .npm --prefer-offline'
|
||||||
|
|
||||||
|
- name: 'Release'
|
||||||
|
run: 'npm run release'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
28
.github/workflows/codeql-analysis.yml
vendored
28
.github/workflows/codeql-analysis.yml
vendored
@ -1,28 +0,0 @@
|
|||||||
name: 'CodeQL'
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [master]
|
|
||||||
pull_request:
|
|
||||||
branches: [master]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
name: 'Analyze'
|
|
||||||
runs-on: 'ubuntu-latest'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
language: ['javascript']
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: 'actions/checkout@v2.3.4'
|
|
||||||
|
|
||||||
- name: 'Initialize CodeQL'
|
|
||||||
uses: 'github/codeql-action/init@v1'
|
|
||||||
with:
|
|
||||||
languages: ${{ matrix.language }}
|
|
||||||
|
|
||||||
- name: 'Perform CodeQL Analysis'
|
|
||||||
uses: 'github/codeql-action/analyze@v1'
|
|
34
.github/workflows/release.yml
vendored
34
.github/workflows/release.yml
vendored
@ -1,34 +0,0 @@
|
|||||||
name: 'Release'
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: [Divlo]
|
|
||||||
branches: [master]
|
|
||||||
types:
|
|
||||||
- 'completed'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
runs-on: 'ubuntu-latest'
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [14.x]
|
|
||||||
steps:
|
|
||||||
- uses: 'actions/checkout@v2.3.4'
|
|
||||||
|
|
||||||
- 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.6'
|
|
||||||
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 }}
|
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"branches": ["master"],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
[
|
[
|
||||||
"@semantic-release/commit-analyzer",
|
"@semantic-release/commit-analyzer",
|
||||||
@ -6,7 +7,12 @@
|
|||||||
"preset": "conventionalcommits"
|
"preset": "conventionalcommits"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@semantic-release/release-notes-generator",
|
[
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
{
|
||||||
|
"preset": "conventionalcommits"
|
||||||
|
}
|
||||||
|
],
|
||||||
"@semantic-release/github"
|
"@semantic-release/github"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user