mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
define all backend workflows
This commit is contained in:
parent
b0fb1cdee3
commit
48c89df8ac
1
.github/.remarkignore
vendored
Normal file
1
.github/.remarkignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*
|
||||
14
.github/file-filters.yml
vendored
Normal file
14
.github/file-filters.yml
vendored
Normal 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/*'
|
||||
21
.github/workflows/backend.deploy.docs.yml
vendored
Normal file
21
.github/workflows/backend.deploy.docs.yml
vendored
Normal 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"
|
||||
34
.github/workflows/backend.test.build.code.yml
vendored
Normal file
34
.github/workflows/backend.test.build.code.yml
vendored
Normal 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
|
||||
34
.github/workflows/backend.test.build.docs.yml
vendored
Normal file
34
.github/workflows/backend.test.build.docs.yml
vendored
Normal 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
|
||||
34
.github/workflows/backend.test.lint.code.yml
vendored
Normal file
34
.github/workflows/backend.test.lint.code.yml
vendored
Normal 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
|
||||
34
.github/workflows/backend.test.unit.code.yml
vendored
Normal file
34
.github/workflows/backend.test.unit.code.yml
vendored
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user