|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: push |
| 4 | + |
| 5 | +jobs: |
| 6 | + audit: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + name: Audit |
| 9 | + steps: |
| 10 | + - name: Checkout repository |
| 11 | + uses: actions/checkout@v4 |
| 12 | + - name: Set up Node.js |
| 13 | + uses: actions/setup-node@v4 |
| 14 | + with: |
| 15 | + node-version-file: .nvmrc |
| 16 | + cache: npm |
| 17 | + - name: Audit dependencies |
| 18 | + run: npm audit |
| 19 | + |
| 20 | + format: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + name: Format check |
| 23 | + steps: |
| 24 | + - name: Checkout repository |
| 25 | + uses: actions/checkout@v4 |
| 26 | + - name: Set up Node.js |
| 27 | + uses: actions/setup-node@v4 |
| 28 | + with: |
| 29 | + node-version-file: .nvmrc |
| 30 | + cache: npm |
| 31 | + - name: Install dependencies |
| 32 | + run: npm ci |
| 33 | + - name: Check formatting |
| 34 | + run: npm run format |
| 35 | + |
| 36 | + lint: |
| 37 | + runs-on: ubuntu-latest |
| 38 | + name: Linter |
| 39 | + steps: |
| 40 | + - name: Checkout repository |
| 41 | + uses: actions/checkout@v4 |
| 42 | + - name: Set up Node.js |
| 43 | + uses: actions/setup-node@v4 |
| 44 | + with: |
| 45 | + node-version-file: .nvmrc |
| 46 | + cache: npm |
| 47 | + - name: Install dependencies |
| 48 | + run: npm ci |
| 49 | + - name: Lint affected projects |
| 50 | + run: npm run lint |
| 51 | + |
| 52 | + test: |
| 53 | + strategy: |
| 54 | + fail-fast: false |
| 55 | + matrix: |
| 56 | + os: [ubuntu-latest, windows-latest] |
| 57 | + name: Unit tests |
| 58 | + runs-on: ${{ matrix.os }} |
| 59 | + steps: |
| 60 | + - name: Checkout repository |
| 61 | + uses: actions/checkout@v4 |
| 62 | + - name: Set up Node.js |
| 63 | + uses: actions/setup-node@v4 |
| 64 | + with: |
| 65 | + node-version-file: .nvmrc |
| 66 | + cache: npm |
| 67 | + - name: Install dependencies |
| 68 | + run: npm ci |
| 69 | + - name: run unit tests |
| 70 | + run: npm run test |
| 71 | + |
| 72 | + build: |
| 73 | + runs-on: ubuntu-latest |
| 74 | + name: Build |
| 75 | + steps: |
| 76 | + - name: Checkout repository |
| 77 | + uses: actions/checkout@v4 |
| 78 | + - name: Set up Node.js |
| 79 | + uses: actions/setup-node@v4 |
| 80 | + with: |
| 81 | + node-version-file: .nvmrc |
| 82 | + cache: npm |
| 83 | + - name: Install dependencies |
| 84 | + run: npm ci |
| 85 | + - name: Build project |
| 86 | + run: npm run build |
0 commit comments