Fix bug where hidden row pin made rows clickable beyond their bounds #556
This file contains 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: [push, pull_request] | |
env: | |
UI_VERSION: ${{ github.sha }} | |
jobs: | |
build: | |
name: Build & test | |
runs-on: ubuntu-latest | |
container: httptoolkit/act-build-base:v3.0.0 | |
steps: | |
- uses: actions/checkout@v3 | |
# Install Node 16 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.16.0 | |
cache: 'npm' | |
- run: npm install -g [email protected] | |
# Install & build & test: | |
- run: npm ci | |
- run: npm run test:unit | |
# Build & run normal integration tests: | |
- name: Build & test | |
run: npm run test:integration | |
if: github.ref != 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # To pull server without rate limit issues in CI | |
# Build with secrets & run integrations tests, on main only: | |
- name: Build & test for production release | |
run: npm run test:integration | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
env: | |
POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SENTRY_ORG: http-toolkit | |
SENTRY_PROJECT: httptoolkit-ui | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # To pull server without rate limit issues in CI | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/* | |
if-no-files-found: error | |
publish-netlify: | |
name: Deploy ${{ (github.ref == 'refs/heads/main' && 'to Netlify production') || 'Netlify preview' }} | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
container: httptoolkit/act-build-base | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- name: Deploy to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './dist' | |
production-branch: main # Main goes to prod, others do deploy previews | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: GHA Deploy - ${{ github.event.head_commit.message }} | |
enable-commit-status: true | |
enable-pull-request-comment: false | |
enable-commit-comment: false | |
netlify-config-path: ./netlify.toml | |
alias: ${{ github.sha }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 | |
publish-docker: | |
name: Build & publish container to Docker Hub | |
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/dependabot/') | |
runs-on: ubuntu-latest | |
container: httptoolkit/act-build-base | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
images: httptoolkit/ui | |
tags: | | |
type=raw,value=prod,enable={{is_default_branch}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=sha | |
- name: Build and publish to Docker Hub | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: ${{ github.event_name == 'push' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
publish-scaleway: | |
name: Deploy to Scaleway | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
container: httptoolkit/act-build-base | |
needs: publish-docker | |
steps: | |
- name: Redeploy container | |
uses: thibaultchazal/scaleway-serverless-container-deploy-action@0d290edda0c3359e51442bd8bf730eafef4e290f | |
with: | |
container_id: ${{ vars.SCW_API_CONTAINER_ID }} | |
secret_key: ${{ secrets.SCW_SECRET_KEY }} | |
registry_image_url: "registry.hub.docker.com/httptoolkit/ui:prod" | |
- name: Flush CDN cache | |
run: | | |
# Clear CDN cache to re-request content: | |
curl -f --request POST \ | |
--url https://api.bunny.net/pullzone/$PULL_ZONE_ID/purgeCache \ | |
--header "AccessKey: $BUNNY_SITE_API_KEY" | |
env: | |
PULL_ZONE_ID: 1110200 | |
BUNNY_SITE_API_KEY: ${{ secrets.BUNNY_SITE_API_KEY }} |