Commit c9b4583e authored by Michael Underwood's avatar Michael Underwood
Browse files

Allow CI linting without build

parent b35f10b2
Loading
Loading
Loading
Loading
+25 −8
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ on:
jobs:

  setup:
    name: Install and build
    name: Set up env
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
@@ -27,10 +27,7 @@ jobs:
      - name: Install dependencies
        run: yarn install --frozen-lockfile

      - name: Build vue-leaflet
        run: yarn build

      - name: Cache results
      - name: Cache setup
        uses: actions/cache@v3
        with:
          path: ./*
@@ -50,8 +47,8 @@ jobs:
      - name: Lint
        run: yarn lint-only --max-warnings=0
  
  unit_tests:
    name: Run unit tests
  build:
    name: Build vue-leaflet
    runs-on: ubuntu-latest
    needs: setup
    steps:
@@ -61,6 +58,26 @@ jobs:
          path: ./*
          key: ${{ runner.os }}-${{ github.ref }}-${{ github.sha }}-setup

      - name: yarn build
        run: yarn build

      - name: Cache build
        uses: actions/cache@v3
        with:
          path: ./*
          key: ${{ runner.os }}-${{ github.ref }}-${{ github.sha }}-build

  unit_tests:
    name: Run unit tests
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Restore cache
        uses: actions/cache@v3
        with:
          path: ./*
          key: ${{ runner.os }}-${{ github.ref }}-${{ github.sha }}-build
      
      - name: Run tests
        run: yarn test