diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2609b694..27053851 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,28 +6,17 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [12.x] - + os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v1 - - - name: Cache node modules - uses: actions/cache@v1 + - uses: actions/checkout@v2 + - name: Setup node 12 + uses: actions/setup-node@v2 with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Node ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: unit tests - run: | - npm install - npm test + node-version: 12.x + - run: npm ci + - run: npm run build + - run: npm run format-check + - run: npm test