ci: add GitHub Actions

This commit is contained in:
divlo
2020-12-28 11:44:23 +01:00
parent 7921d06785
commit 3ed686cddd
8 changed files with 288 additions and 22 deletions

18
.github/workflows/commitlint.yml vendored Normal file
View 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
View 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'