diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e7e03b6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +# This workflow will do a clean install of node dependencies and run tests and +# validations. This will use the pinned version inside the .nvmrc file +# for the node installation. +# +# Required secrets: +# ------------------------------------------------------------------------------ +# (none) + +name: CI + +on: + push: + branches: + - master + - feature/* + pull_request: + branches: + - master + +jobs: + tests: + name: Tests and validations + runs-on: ubuntu-latest + + steps: + - name: Git checkout + uses: actions/checkout@v2 + + - name: Read .nvmrc + id: nvm + run: echo ::set-output name=NVMRC::$(cat .nvmrc) + + - name: Use Node.js ${{ steps.nvm.outputs.NVMRC }} + uses: actions/setup-node@v1 + with: + node-version: '${{ steps.nvm.outputs.NVMRC }}' + + - name: Install dependencies + run: npm install + + - name: Run tests + run: make tests + env: + CI: true + + - name: Run validations + run: make validate + env: + CI: true