Test: V6 Instance Provider #202
Workflow file for this run
This file contains hidden or 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: nodejs | |
on: | |
# run on push but only for the main branch | |
push: | |
branches: | |
- main | |
# run for every pull request | |
pull_request: {} | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 🤝 Set Node version from .nvmrc | |
run: echo NVMRC=`cat ./server/node/.nvmrc` >> $GITHUB_ENV | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NVMRC }} | |
- name: 📥 Download deps | |
run: > | |
find . -name package.json -maxdepth 10 -type f -not -path "*/node_modules/*" | while read -r file; do | |
directory=$(dirname "$file") | |
echo "::group:: $directory" | |
cd "$directory" | |
npm install || exit 1 | |
cd - | |
echo "::endgroup::" | |
done | |
- name: 🧹 Check code formatting with Prettier | |
run: > | |
find . -name package.json -maxdepth 10 -type f -not -path "*/node_modules/*" | while read -r file; do | |
directory=$(dirname "$file") | |
echo "::group:: $directory" | |
cd "$directory" | |
npm run format:check || exit 1 | |
cd - | |
echo "::endgroup::" | |
done | |
- name: 👕 Lint code with ESLint | |
run: > | |
find . -name package.json -maxdepth 10 -type f -not -path "*/node_modules/*" | while read -r file; do | |
directory=$(dirname "$file") | |
echo "::group:: $directory" | |
cd "$directory" | |
npm run lint || exit 1 | |
cd - | |
echo "::endgroup::" | |
done |