Skip to content

Commit

Permalink
ci: split actions
Browse files Browse the repository at this point in the history
- use one action to check PR build
- use one action to check that there is no breaking change
  • Loading branch information
deblockt committed Jun 3, 2022
1 parent 705e822 commit 5950e7d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pr-check.yml
@@ -0,0 +1,20 @@
name: PR check

on:
pull_request:

jobs:
check-build-files-in-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build
- name: Confirm new build included in commit
# language=bash
run: |
# Confirm that the dist was built, and changes included in the commit
if [ $(git status --porcelain dist/index.js | wc -l) -eq "1" ]; then
echo "::error title=Build not committed::Running 'npm run build' changes 'dist/index.js' - build locally and add changes to commit."
exit 1
fi
15 changes: 0 additions & 15 deletions .github/workflows/test.yml
Expand Up @@ -8,21 +8,6 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build
- name: Confirm new build included in commit
# language=bash
run: |
# Confirm that the dist was built, and changes included in the commit
if [ $(git status --porcelain dist/index.js | wc -l) -eq "1" ]; then
echo "::error title=Build not committed::Running 'npm run build' changes 'dist/index.js' - build locally and add changes to commit."
exit 1
fi
direct-from-repository-test:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 5950e7d

Please sign in to comment.