|
| 1 | +name: Pull Request |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + types: [opened, reopened, synchronize] |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + name: Build |
| 12 | + |
| 13 | + runs-on: ubuntu-latest |
| 14 | + |
| 15 | + steps: |
| 16 | + - name: Fetch Git entire history for all branches and tags |
| 17 | + uses: actions/checkout@v3 |
| 18 | + with: |
| 19 | + fetch-depth: 0 |
| 20 | + ref: ${{ github.event.pull_request.head.ref }} |
| 21 | + |
| 22 | + - name: Derive appropriate SHAs for base and head for `nx affected` commands |
| 23 | + uses: nrwl/nx-set-shas@v2 |
| 24 | + |
| 25 | + - name: Setup Node.js |
| 26 | + uses: actions/setup-node@v3 |
| 27 | + with: |
| 28 | + cache: 'npm' |
| 29 | + node-version-file: '.nvmrc' |
| 30 | + |
| 31 | + - name: Install Dependencies |
| 32 | + run: npm ci |
| 33 | + |
| 34 | + - name: Run build |
| 35 | + run: npm run build presto-client |
| 36 | + |
| 37 | + check-format: |
| 38 | + name: Check Format |
| 39 | + |
| 40 | + runs-on: ubuntu-latest |
| 41 | + |
| 42 | + steps: |
| 43 | + - name: Fetch Git entire history for all branches and tags |
| 44 | + uses: actions/checkout@v3 |
| 45 | + with: |
| 46 | + fetch-depth: 0 |
| 47 | + ref: ${{ github.event.pull_request.head.ref }} |
| 48 | + |
| 49 | + - name: Derive appropriate SHAs for base and head for `nx affected` commands |
| 50 | + uses: nrwl/nx-set-shas@v2 |
| 51 | + |
| 52 | + - name: Setup Node.js |
| 53 | + uses: actions/setup-node@v3 |
| 54 | + with: |
| 55 | + cache: 'npm' |
| 56 | + node-version-file: '.nvmrc' |
| 57 | + |
| 58 | + - name: Install Dependencies |
| 59 | + run: npm ci |
| 60 | + |
| 61 | + - name: Check format |
| 62 | + run: npm run format:check |
| 63 | + |
| 64 | + lint: |
| 65 | + name: Lint |
| 66 | + |
| 67 | + runs-on: ubuntu-latest |
| 68 | + |
| 69 | + steps: |
| 70 | + - name: Fetch Git entire history for all branches and tags |
| 71 | + uses: actions/checkout@v3 |
| 72 | + with: |
| 73 | + fetch-depth: 0 |
| 74 | + ref: ${{ github.event.pull_request.head.ref }} |
| 75 | + |
| 76 | + - name: Derive appropriate SHAs for base and head for `nx affected` commands |
| 77 | + uses: nrwl/nx-set-shas@v2 |
| 78 | + |
| 79 | + - name: Setup Node.js |
| 80 | + uses: actions/setup-node@v3 |
| 81 | + with: |
| 82 | + cache: 'npm' |
| 83 | + node-version-file: '.nvmrc' |
| 84 | + |
| 85 | + - name: Install Dependencies |
| 86 | + run: npm ci |
| 87 | + |
| 88 | + - name: Run lint |
| 89 | + run: npm run lint presto-client |
| 90 | + |
| 91 | + test: |
| 92 | + name: Test |
| 93 | + |
| 94 | + runs-on: ubuntu-latest |
| 95 | + |
| 96 | + steps: |
| 97 | + - name: Fetch Git entire history for all branches and tags |
| 98 | + uses: actions/checkout@v3 |
| 99 | + with: |
| 100 | + fetch-depth: 0 |
| 101 | + ref: ${{ github.event.pull_request.head.ref }} |
| 102 | + |
| 103 | + - name: Derive appropriate SHAs for base and head for `nx affected` commands |
| 104 | + uses: nrwl/nx-set-shas@v2 |
| 105 | + |
| 106 | + - name: Setup Node.js |
| 107 | + uses: actions/setup-node@v3 |
| 108 | + with: |
| 109 | + cache: 'npm' |
| 110 | + node-version-file: '.nvmrc' |
| 111 | + |
| 112 | + - name: Install Dependencies |
| 113 | + run: npm ci |
| 114 | + |
| 115 | + - name: Run tests |
| 116 | + run: npm run test presto-client |
0 commit comments