define all backend workflows

This commit is contained in:
Ulf Gebhardt 2023-12-07 17:09:12 +01:00
parent b0fb1cdee3
commit 48c89df8ac
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
7 changed files with 172 additions and 0 deletions

1
.github/.remarkignore vendored Normal file
View File

@ -0,0 +1 @@
*

14
.github/file-filters.yml vendored Normal file
View File

@ -0,0 +1,14 @@
# These file filter patterns are used by the action https://github.com/dorny/paths-filter
backend-test-lint-code: &backend-test-lint-code
- '**/*'
backend-test-unit-code: &backend-test-unit-code
- '**/*'
backend-test-build-code: &backend-test-build-code
- '**/*'
backend-test-build-docs: &backend-test-build-docs
- '**/*.md'
- '.vuepress/*'

View File

@ -0,0 +1,21 @@
name: "backend:deploy:docs to github"
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: vuepress-deploy
uses: jenkey2011/vuepress-deploy@master
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#TARGET_REPO: username/repo
#TARGET_BRANCH: master
BUILD_SCRIPT: npm install && npm run docs:build
BUILD_DIR: build/docs/
VUEPRESS_BASE: "boilerplate-backend"

View File

@ -0,0 +1,34 @@
name: "backend: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 - backend-test-build-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.backend-test-build-code }}
steps:
- uses: actions/checkout@v3.3.0
- name: Check for backend 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 - Backend
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Backend | Build
run: npm install && npm run build

View File

@ -0,0 +1,34 @@
name: "backend:test:build test docs"
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 - backend-test-build-docs
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.backend-test-build-docs }}
steps:
- uses: actions/checkout@v3.3.0
- name: Check for backend 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 Docs - Backend
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Backend | Build Docs
run: npm install && npm run docs:build

View File

@ -0,0 +1,34 @@
name: "backend:test:lint code with defined linters"
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 - backend-test-lint-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.backend-test-lint-code }}
steps:
- uses: actions/checkout@v3.3.0
- name: Check for backend file changes
uses: dorny/paths-filter@v2.11.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell
lint:
if: needs.files-changed.outputs.changes == 'true'
name: Lint - Backend
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Backend | Lint
run: npm install && npm run test:lint

View File

@ -0,0 +1,34 @@
name: "backend:test:unit test code with defined suites"
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 - backend-test-unit-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.backend-test-unit-code }}
steps:
- uses: actions/checkout@v3.3.0
- name: Check for backend file changes
uses: dorny/paths-filter@v2.11.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell
unit:
if: needs.files-changed.outputs.changes == 'true'
name: Unit - Backend
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Backend | Unit
run: npm install && npm run test:unit