diff --git a/server/.github/workflows/node.js.yml b/server/.github/workflows/node.js.yml new file mode 100644 index 000000000..982276822 --- /dev/null +++ b/server/.github/workflows/node.js.yml @@ -0,0 +1,39 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# 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: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Test on Node.js 15 + uses: actions/setup-node@v2 + with: + node-version: 15.x + + - name: Cache pnpm modules + uses: actions/cache@v2 + env: + cache-name: cache-pnpm-modules + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-build-${{ env.cache-name }}-15.x-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}-15.x- + + - uses: pnpm/action-setup@v2.0.1 + with: + version: 6.0.2 + + - run: pnpm i + - run: pnpm lint + - run: pnpm test