-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bd49a1
commit 6c2dd07
Showing
1 changed file
with
48 additions
and
0 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,48 @@ | ||
name: CI | ||
|
||
on: | ||
merge_group: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: 'package.json' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run Format Check | ||
run: npm run prettier.dry-run | ||
- name: Build project | ||
run: npm run build | ||
- name: Run Tests | ||
run: npm test -- --no-watch | ||
|
||
# Verify that the Example Project Builds | ||
- name: Install Example Project Dependencies | ||
working-directory: './example' | ||
run: npm ci | ||
|
||
- name: Build Example Project | ||
working-directory: './example' | ||
run: npm run build | ||
|
||
- name: Verify No Files Have Changed | ||
working-directory: './example' | ||
# here we check that there are no changed / new files. | ||
# we use `git status` and check if there are more than 0 lines in the output. | ||
run: | | ||
if [[ $(git status --short | wc -l) -ne 0 ]]; then | ||
STATUS=$(git status --verbose); | ||
printf "%s" "$STATUS"; | ||
git diff | cat; | ||
exit 1; | ||
fi | ||
shell: bash |