ci: add GitHub Actions
This commit is contained in:
18
.github/workflows/commitlint.yml
vendored
Normal file
18
.github/workflows/commitlint.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# For more information see: https://github.com/marketplace/actions/commit-linter
|
||||
|
||||
name: 'Lint Commit Messages'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v2'
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: 'wagoid/commitlint-github-action@v2'
|
||||
86
.github/workflows/nodejs.yml
vendored
Normal file
86
.github/workflows/nodejs.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: 'Node.js CI'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
ci_website:
|
||||
runs-on: 'ubuntu-latest'
|
||||
defaults:
|
||||
run:
|
||||
working-directory: 'website'
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- uses: 'actions/checkout@v2'
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: 'actions/setup-node@v2.1.2'
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: 'Cache dependencies'
|
||||
uses: 'actions/cache@v2'
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- run: 'npm install'
|
||||
- run: 'npm run lint'
|
||||
- run: 'npm run build'
|
||||
|
||||
ci_api:
|
||||
runs-on: 'ubuntu-latest'
|
||||
defaults:
|
||||
run:
|
||||
working-directory: 'api'
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- uses: 'actions/checkout@v2'
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: 'actions/setup-node@v2.1.2'
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: 'Cache dependencies'
|
||||
uses: 'actions/cache@v2'
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- run: 'npm install'
|
||||
- run: 'npm run lint'
|
||||
|
||||
ci_s-divlo-fr:
|
||||
runs-on: 'ubuntu-latest'
|
||||
defaults:
|
||||
run:
|
||||
working-directory: 's.divlo.fr'
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- uses: 'actions/checkout@v2'
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: 'actions/setup-node@v2.1.2'
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: 'Cache dependencies'
|
||||
uses: 'actions/cache@v2'
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- run: 'npm install'
|
||||
- run: 'npm run lint'
|
||||
Reference in New Issue
Block a user