[chore] Append backend project structure principles #696
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
static-checks: | |
name: Static checks | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Load current commit | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Read nvmrc | |
id: read-nvmrc | |
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.read-nvmrc.outputs.version }} | |
cache: 'npm' | |
- name: Install dependencies and check package-lock.json | |
run: | | |
cp package-lock.json package-lock.json.orig | |
npm install | |
if ! diff --color=always package-lock.json.orig package-lock.json ; then | |
echo "package-lock.json changed, failing build" | |
exit 1 | |
fi | |
- name: Run static checks | |
run: npm run static-checks |