ci: add deployment upgrade workflows #387
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| verify: | |
| name: Verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24.14.1 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Restish | |
| run: | | |
| version=0.21.2 | |
| archive="restish-${version}-linux-amd64.tar.gz" | |
| curl -fsSL "https://github.com/rest-sh/restish/releases/download/v${version}/${archive}" -o "$archive" | |
| curl -fsSL "https://github.com/rest-sh/restish/releases/download/v${version}/checksums.txt" -o checksums.txt | |
| grep " ${archive}$" checksums.txt | sha256sum --check - | |
| tar -xzf "$archive" | |
| sudo install restish /usr/local/bin/restish | |
| restish --version | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Lint | |
| run: npm run lint | |
| - name: Test | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24.14.1 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Restish | |
| run: | | |
| version=0.21.2 | |
| archive="restish-${version}-linux-amd64.tar.gz" | |
| curl -fsSL "https://github.com/rest-sh/restish/releases/download/v${version}/${archive}" -o "$archive" | |
| curl -fsSL "https://github.com/rest-sh/restish/releases/download/v${version}/checksums.txt" -o checksums.txt | |
| grep " ${archive}$" checksums.txt | sha256sum --check - | |
| tar -xzf "$archive" | |
| sudo install restish /usr/local/bin/restish | |
| restish --version | |
| - name: Coverage | |
| run: npm run test:coverage | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: ./coverage/lcov.info | |
| fail_ci_if_error: true | |
| use_oidc: true |