-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from MatteoPologruto/check-packaging
Change development policy to continuous packaging
- Loading branch information
Showing
3 changed files
with
152 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Check Packaging | ||
|
||
env: | ||
# See: https://github.com/actions/setup-node/#readme | ||
NODE_VERSION: 16.x | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/check-packaging-ncc-typescript-npm.yml" | ||
- "lerna.json" | ||
- "package.json" | ||
- "package-lock.json" | ||
- "tsconfig.json" | ||
- "**.[jt]sx?" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/check-packaging-ncc-typescript-npm.yml" | ||
- "lerna.json" | ||
- "package.json" | ||
- "package-lock.json" | ||
- "tsconfig.json" | ||
- "**.[jt]sx?" | ||
workflow_dispatch: | ||
repository_dispatch: | ||
|
||
jobs: | ||
check-packaging: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build project | ||
run: | | ||
npm run-script build | ||
npm run-script pack | ||
- name: Check packaging | ||
# Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain | ||
# Unix-style EOL. | ||
run: git diff --ignore-cr-at-eol --color --exit-code dist |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
schedule: # Scheduled trigger checks for breakage caused by changes to create-changelog | ||
# run every Tuesday at 3 AM UTC | ||
- cron: "0 3 * * 2" | ||
# workflow_dispatch event allows the workflow to be triggered manually | ||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch | ||
workflow_dispatch: | ||
# repository_dispatch event allows the workflow to be triggered via the GitHub API | ||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch | ||
repository_dispatch: | ||
|
||
jobs: | ||
defaults: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout local repository | ||
uses: actions/checkout@v3 | ||
|
||
# Run the action using default values as much as possible. | ||
- name: Run action | ||
uses: ./ # Use the action from the local path. | ||
|
||
expected-pass: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CHANGELOG_FILE_PATH: /tmp/CHANGELOG.md | ||
steps: | ||
- name: Checkout local repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run action | ||
uses: ./ | ||
with: | ||
tag-regex: '^[0-9]+\.[0-9]+\.[0-9]+.*$' | ||
case-insensitive-regex: true | ||
changelog-file-path: "${{ env.CHANGELOG_FILE_PATH }}" | ||
|
||
- name: Verify report file exists | ||
run: | | ||
[ -e "${{ env.CHANGELOG_FILE_PATH }}" ] |
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