-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add windows to validate workflow
- Loading branch information
1 parent
08d9284
commit 1dc459f
Showing
2 changed files
with
78 additions
and
4 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,73 @@ | ||
name: Test Windows | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- edited | ||
- opened | ||
- synchronize | ||
push: | ||
branches: | ||
- '*' | ||
- '!main' | ||
|
||
jobs: | ||
validate: | ||
runs-on: windows-latest | ||
name: Validate | ||
|
||
steps: | ||
- name: Checkout Commit | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 10 | ||
|
||
# Needed for https://github.com/moonrepo/moon/issues/1060 | ||
- name: Force Update Main | ||
run: | | ||
git fetch origin | ||
git branch -f main origin/main | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Enable Corepack | ||
id: pnpm-setup | ||
run: | | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
pnpm config set script-shell "/usr/bin/bash" | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- name: pnpm Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.pnpm-setup.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Setup Moon | ||
uses: moonrepo/setup-toolchain@v0 | ||
|
||
- name: pnpm install | ||
run: | | ||
pnpm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe" | ||
pnpm install --frozen-lockfile | ||
shell: bash | ||
|
||
- name: Build Projects | ||
run: moon jsx-email:build | ||
|
||
- name: Run Tests | ||
run: moon run :test --affected --concurrency 1 --remote | ||
|
||
- name: Run Preview Test | ||
# Note: We're running `pnpm i` again so that pnpm places the `email` bin in root node_modules | ||
# We'll need that for the preview tests below | ||
run: | | ||
pnpm i | ||
moon app-test:playwright |
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