|
| 1 | +name: Lint, test and build |
| 2 | +on: [push] |
| 3 | +jobs: |
| 4 | + cache-dependencies: |
| 5 | + runs-on: ubuntu-latest |
| 6 | + steps: |
| 7 | + - uses: actions/checkout@v3 |
| 8 | + - name: Use Node.js ${{ matrix.node-version }} |
| 9 | + uses: actions/setup-node@v3 |
| 10 | + with: |
| 11 | + node-version: ${{ matrix.node-version }} |
| 12 | + cache: "npm" |
| 13 | + - uses: actions/cache@v2 |
| 14 | + with: |
| 15 | + path: "**/node_modules" |
| 16 | + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
| 17 | + - name: Installing dependencies |
| 18 | + run: npm ci |
| 19 | + |
| 20 | + tsc-and-linting: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + needs: cache-dependencies |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v3 |
| 25 | + - name: Use Node.js ${{ matrix.node-version }} |
| 26 | + uses: actions/setup-node@v3 |
| 27 | + with: |
| 28 | + node-version: ${{ matrix.node-version }} |
| 29 | + cache: "npm" |
| 30 | + - uses: actions/cache@v2 |
| 31 | + with: |
| 32 | + path: "**/node_modules" |
| 33 | + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
| 34 | + - name: Installing dependencies |
| 35 | + run: npm ci |
| 36 | + - run: npm run tsc |
| 37 | + - run: npm run lint |
| 38 | + |
| 39 | + unit-tests: |
| 40 | + runs-on: ubuntu-latest |
| 41 | + needs: cache-dependencies |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v3 |
| 44 | + - name: Use Node.js ${{ matrix.node-version }} |
| 45 | + uses: actions/setup-node@v3 |
| 46 | + with: |
| 47 | + node-version: ${{ matrix.node-version }} |
| 48 | + cache: "npm" |
| 49 | + - uses: actions/cache@v2 |
| 50 | + with: |
| 51 | + path: "**/node_modules" |
| 52 | + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
| 53 | + - name: Installing dependencies |
| 54 | + run: npm ci |
| 55 | + - run: npm run test |
| 56 | + |
| 57 | + build: |
| 58 | + runs-on: ubuntu-latest |
| 59 | + needs: cache-dependencies |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v3 |
| 62 | + - name: Use Node.js ${{ matrix.node-version }} |
| 63 | + uses: actions/setup-node@v3 |
| 64 | + with: |
| 65 | + node-version: ${{ matrix.node-version }} |
| 66 | + cache: "npm" |
| 67 | + - uses: actions/cache@v2 |
| 68 | + with: |
| 69 | + path: "**/node_modules" |
| 70 | + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
| 71 | + - name: Installing dependencies |
| 72 | + run: npm ci |
| 73 | + - run: npm run build |
0 commit comments