Skip to content

Commit

Permalink
Merge pull request #69 from BuilderIO/chore/add-testing-pipeline
Browse files Browse the repository at this point in the history
chore(cicd): setup test pipeline
  • Loading branch information
marcelovicentegc authored Jan 3, 2024
2 parents b802560 + f1588af commit de19048
Show file tree
Hide file tree
Showing 7 changed files with 1,580 additions and 9,822 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/build.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Pull request workflow

on:
pull_request:
types: [opened, reopened, synchronize, edited]

permissions:
pull-requests: read

jobs:
build:
name: Build and test
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: npm
node-version: 18
- run: npm i
- run: npm run build
- run: npm run test
- uses: preactjs/compressed-size-action@v2
with:
pattern: ".dist/**/*.{js,ts,json}"
static-tests:
name: Static tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: npm
node-version: 18
- run: npm i
- run: npm run prettier:check
build-docker:
name: Build Docker image
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: false
semantic-pr:
name: Validate PR title for semantic versioning
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 0 additions & 18 deletions .github/workflows/test.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run fmt
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ FROM apify/actor-node-playwright-chrome:18 AS builder
# to speed up the build using Docker layer cache.
COPY --chown=myuser package*.json ./

# Delete the prepare script. It's not needed in the final image.
RUN npm pkg delete scripts.prepare

# Install all dependencies. Don't audit to speed up the installation.
RUN npm install --include=dev --audit=false

Expand All @@ -31,7 +34,8 @@ COPY --chown=myuser package*.json ./
# Install NPM packages, skip optional and development dependencies to
# keep the image small. Avoid logging too much and print the dependency
# tree for debugging
RUN npm --quiet set progress=false \
RUN npm pkg delete scripts.prepare \
&& npm --quiet set progress=false \
&& npm install --omit=dev --omit=optional \
&& echo "Installed NPM packages:" \
&& (npm list --omit=dev --all || true) \
Expand Down
Loading

0 comments on commit de19048

Please sign in to comment.