-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: switch from circle ci to github actions #3783
Changes from 14 commits
e98a890
9142b8e
53fa9a9
0545bb7
3c3432f
3da9406
503f29a
a91307a
f99bfb4
88e54d5
f3762be
fe82cc9
1d754ae
bc9f289
8ccc746
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
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 |
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 |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of having a custom script to retry, what about using a GH action retry step? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw this, but I felt uncomfortable since it's not an officially supported Action. |
||
# | ||
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It takes ~1 min to build to build the repo. Is it worth reusing the NX cache between runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have run into numerous issues with NX caching recently (something about stale/invalid artifacts), so we actually disabled it in Nucleus runs.
I'm happy to re-enable it at some point, but saving ~60s is not super important to me right now.