# https://help.github.com/en/articles/workflow-syntax-for-github-actions name: Build on: - push - pull_request jobs: build: name: Build runs-on: ${{ matrix.os }} strategy: matrix: os: - Windows-2019 - macOS-10.15 - Ubuntu-16.04 - Ubuntu-18.04 - Ubuntu-20.04 nodejs: - 12 fail-fast: false steps: - name: Turn off auto-crlf run: git config --global core.autocrlf false - name: Checkout source codes uses: actions/checkout@v2 - name: Install Node.js uses: actions/setup-node@v1 with: node-version: ${{ matrix.nodejs }} - name: Cache node modules uses: actions/cache@v2 env: cache-name: cache-node-modules with: path: "**/node_modules" key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: Install dependencies run: npm ci - name: Build run: npm run build - name: Verify run: npm run verify