-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CU-86a0jg60u - Setup CI/CD on WcSdk repository to check the build and…
… the e2e tests on the pullrequest
- Loading branch information
Leonardo de Jesus Diz Conde
committed
Sep 19, 2023
1 parent
6edbfdc
commit 0543939
Showing
7 changed files
with
66 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 Build and Test | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
NODE_VERSION: 16.x | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Setup Node Version ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Install PNPM | ||
run: npm install -g pnpm | ||
- name: Install RushJS | ||
run: npm install -g @microsoft/rush | ||
- name: Install Yarn | ||
run: npm install --global yarn | ||
- name: Verify Change Logs | ||
run: rush change --verify | ||
- name: Install Dependencies | ||
run: rush update | ||
- name: Build Projects | ||
run: rush rebuild --verbose | ||
- name: Install Examples Dependencies | ||
working-directory: ./examples | ||
run: | | ||
for dir in */; do | ||
if [ -d "$dir" ]; then | ||
(cd "$dir" && yarn install && yarn build && yarn playwright install) | ||
fi | ||
done | ||
- name: Run E2E Tests | ||
working-directory: ./examples | ||
run: | | ||
yarn global add serve | ||
for dir in */; do | ||
if [ -d "$dir" ]; then | ||
(cd "$dir" && yarn test:e2e:headless) | ||
fi | ||
done | ||
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
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import type { PlaywrightTestConfig } from '@playwright/test' | ||
|
||
const config: PlaywrightTestConfig = { | ||
fullyParallel: true, | ||
testMatch: '**/*.ts', | ||
webServer: { | ||
command: 'yarn start', | ||
command: 'npx serve -s build', | ||
port: 3000, | ||
}, | ||
testDir: 'tests', | ||
timeout: 4000 | ||
} | ||
|
||
export default config |
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
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
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