Skip to content

Commit

Permalink
chore(cicd): setup docker image build test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelovicentegc committed Jan 3, 2024
1 parent b802560 commit 9829e49
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/build.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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
- uses: preactjs/compressed-size-action@v2
with:
pattern: ".dist/**/*.{js,ts,json}"
- run: npm test
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 }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"start:cli": "cross-env NODE_ENV=development npm run build && node dist/src/cli.js",
"start:dev": "cross-env NODE_ENV=development npm run build && node dist/src/main.js",
"start:prod": "node dist/src/main.js",
"test": "echo \"No test specified, please create tests.\" && exit 0",
"build": "tsc",
"fmt": "prettier --write .",
"prettier:check": "prettier --check ."
Expand Down

0 comments on commit 9829e49

Please sign in to comment.