chore(misc): multiple enhancement to github actions (#9000)

* chore: test workflow use redis

* chore: docker build cache sharing

* chore: eslint format yml files

* chore: nodemon restart on art template files changes

* chore: run test on multi node and os

* chore: unnecessary single version matrix build

* chore: fix container operations

Container operations are only supported on Linux runners

* chore: fix gha syntax

* chore: fix node version not show up

* revert: "chore: test workflow use redis"

This reverts commit df818fd697b4c9151ac635cdb5918e03a4b37062.

* revert: "chore: fix container operations"

This reverts commit c949368aa7048b9d0f3f1942501c695f10f07f06.

* revert: "chore: run test on multi node and os"

This reverts commit 6b1cfde579095e73d0314346fb1a2d12d0de00ac.

* chore: run test on multi node version
This commit is contained in:
Tony 2022-02-05 15:36:14 -02:00 committed by GitHub
parent 97429ad016
commit 5326d9f751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 17 deletions

View File

@ -11,20 +11,15 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14.x
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js v14
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: '14'
cache: 'yarn'
- name: build file
- name: Build file
run: yarn && npm run build:all
- name: Deploy
uses: peaceiris/actions-gh-pages@v3

View File

@ -48,5 +48,5 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
cache-from: type=gha,scope=docker-release
cache-to: type=gha,mode=max,scope=docker-release

View File

@ -38,8 +38,10 @@ jobs:
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
cache-from: |
type=gha,scope=docker-test
type=gha,scope=docker-release
cache-to: type=gha,mode=max,scope=docker-test
- name: Run dockerfile
run: |

View File

@ -6,7 +6,7 @@ on:
- master
jobs:
build:
format:
runs-on: ubuntu-latest
steps:

View File

@ -15,8 +15,9 @@ jobs:
strategy:
matrix:
node-version: ['14.x']
node-version: ['14', '16']
name: Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2

View File

@ -16,9 +16,9 @@
"build:radar": "node scripts/workflow/build-radar.js",
"build:maintainer": "node scripts/workflow/build-maintainer.js",
"lint": "eslint .",
"format": "eslint \"**/*.js\" --fix && node docs/.format/format.js && prettier \"**/*.{js,json}\" --write",
"format:staged": "eslint \"**/*.js\" --fix && node docs/.format/format.js --staged && pretty-quick --staged --verbose --pattern \"**/*.{js,json}\"",
"format:check": "eslint \"**/*.js\" && prettier-check \"**/*.{js,json}\"",
"format": "eslint \"**/*.{js,yml}\" --fix && node docs/.format/format.js && prettier \"**/*.{js,json}\" --write",
"format:staged": "eslint \"**/*.{js,yml}\" --fix && node docs/.format/format.js --staged && pretty-quick --staged --verbose --pattern \"**/*.{js,json}\"",
"format:check": "eslint \"**/*.{js,yml}\" && prettier-check \"**/*.{js,json}\"",
"test": "npm run format:check && cross-env NODE_ENV=test jest --coverage --runInBand --forceExit",
"jest": "cross-env NODE_ENV=test jest --runInBand --forceExit",
"jest:watch": "cross-env NODE_ENV=test jest --watch"
@ -152,5 +152,8 @@
"moduleNameMapper": {
"@/(.*)": "<rootDir>/lib/$1"
}
},
"nodemonConfig": {
"ext": "art,js,mjs,json"
}
}