-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: switch from circle ci to github actions (#3783)
- Loading branch information
1 parent
300b4ea
commit f3252fb
Showing
8 changed files
with
208 additions
and
438 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
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,52 @@ | ||
name: Run WebDriverIO integration tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release | ||
- 'spring*' | ||
- 'summer*' | ||
- 'winter*' | ||
pull_request: | ||
branches: | ||
- master | ||
- release | ||
- 'spring*' | ||
- 'summer*' | ||
- 'winter*' | ||
|
||
env: | ||
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}} | ||
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}} | ||
SAUCE_TUNNEL_ID: github-action-tunnel-karma-${{github.run_id}} | ||
PUPPETEER_SKIP_DOWNLOAD: "true" # only needed for @best/runner-local, unused here | ||
|
||
jobs: | ||
run-integration-tests: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: ./packages/@lwc/integration-tests | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.18.0" | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
working-directory: ./ | ||
|
||
- uses: saucelabs/sauce-connect-action@v2 | ||
with: | ||
username: ${{ secrets.SAUCE_USERNAME }} | ||
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
tunnelName: ${{ env.SAUCE_TUNNEL_ID }} | ||
|
||
- run: yarn sauce:prod --browsers chrome | ||
- run: yarn sauce:dev --browsers chrome |
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,68 @@ | ||
name: Run Karma integration tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release | ||
- 'spring*' | ||
- 'summer*' | ||
- 'winter*' | ||
pull_request: | ||
branches: | ||
- master | ||
- release | ||
- 'spring*' | ||
- 'summer*' | ||
- 'winter*' | ||
|
||
env: | ||
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}} | ||
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}} | ||
SAUCE_TUNNEL_ID: github-action-tunnel-integration-${{github.run_id}} | ||
PUPPETEER_SKIP_DOWNLOAD: "true" # only needed for @best/runner-local, unused here | ||
COVERAGE: "1" | ||
|
||
jobs: | ||
run-karma-tests: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: ./packages/@lwc/integration-karma | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.18.0" | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
working-directory: ./ | ||
|
||
- uses: saucelabs/sauce-connect-action@v2 | ||
with: | ||
username: ${{ secrets.SAUCE_USERNAME }} | ||
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
tunnelName: ${{ env.SAUCE_TUNNEL_ID }} | ||
|
||
- run: yarn sauce:ci | ||
- run: DISABLE_SYNTHETIC=1 yarn sauce:ci | ||
- run: LEGACY_BROWSERS=1 yarn sauce:ci | ||
- run: FORCE_NATIVE_SHADOW_MODE_FOR_TEST=1 yarn sauce:ci | ||
- run: ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn sauce:ci | ||
- run: ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 DISABLE_SYNTHETIC=1 yarn sauce:ci | ||
- run: API_VERSION=58 yarn sauce:ci | ||
- run: API_VERSION=58 DISABLE_SYNTHETIC=1 yarn sauce:ci | ||
- run: API_VERSION=59 yarn sauce:ci | ||
- run: API_VERSION=59 DISABLE_SYNTHETIC=1 yarn sauce:ci | ||
- run: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL=1 yarn sauce:ci | ||
- run: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL=1 DISABLE_SYNTHETIC=1 yarn sauce:ci | ||
- run: DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 DISABLE_SYNTHETIC=1 yarn sauce:ci | ||
- run: NODE_ENV_FOR_TEST=production yarn sauce:ci | ||
- run: NODE_ENV_FOR_TEST=production DISABLE_SYNTHETIC=1 yarn sauce:ci | ||
- run: yarn hydration:sauce:ci | ||
- run: yarn coverage |
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,55 @@ | ||
name: Run unit tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release | ||
- 'spring*' | ||
- 'summer*' | ||
- 'winter*' | ||
pull_request: | ||
branches: | ||
- master | ||
- release | ||
- 'spring*' | ||
- 'summer*' | ||
- 'winter*' | ||
|
||
env: | ||
PUPPETEER_SKIP_DOWNLOAD: "true" # only needed for @best/runner-local, unused here | ||
|
||
jobs: | ||
run-unit-tests: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.18.0" | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Check missing file headers | ||
run: node ./scripts/tasks/check-license-headers.js | ||
- name: Check package.json integrity | ||
run: node ./scripts/tasks/check-and-rewrite-package-json.js --test | ||
- name: Verify @lwc/shared is tree-shakable | ||
run: node ./scripts/tasks/verify-treeshakable.js ./packages/@lwc/shared/dist/index.js | ||
- name: Verify that dependencies are declared | ||
run: node ./scripts/tasks/check-imports-are-declared-dependencies.js | ||
- name: Check formatting | ||
run: yarn prettier --check '{packages,scripts}/**/*.{js,ts,json,md}' | ||
- name: Run linter | ||
run: yarn lint | ||
- name: Check the size of the LWC bundle | ||
run: yarn bundlesize | ||
- name: Run Jest tests | ||
run: yarn test:ci | ||
- name: Run benchmark smoke tests | ||
run: BENCHMARK_SMOKE_TEST=1 yarn test:performance |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) 2023, salesforce.com, inc. | ||
# All rights reserved. | ||
# SPDX-License-Identifier: MIT | ||
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
# | ||
# Retry a script multiple times before failing. Used for CI. | ||
# | ||
|
||
set -e | ||
|
||
export PATH="${PATH}:./node_modules/.bin" | ||
|
||
MAX_RETRY=3 | ||
n=0 | ||
until [ $n -ge $MAX_RETRY ] | ||
do | ||
echo "Try $[$n+1]/$MAX_RETRY..." | ||
"$@" && break | ||
n=$[$n+1] | ||
done | ||
if [ $n -ge $MAX_RETRY ]; then | ||
echo "Failed: ${@}" >&2 | ||
exit 1 | ||
fi |