-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate to release-please reduce complexity of generateScreenshotPath reduce complexity of getConfig fn prepare directory structure for more examples prepare codeclimate configuration for monorepo
- Loading branch information
Showing
66 changed files
with
10,948 additions
and
21,332 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
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 |
---|---|---|
|
@@ -11,176 +11,111 @@ jobs: | |
cache: | ||
name: CI cache | ||
runs-on: ubuntu-latest | ||
outputs: | ||
yarn-cache-key: ${{ steps.yarn-cache-key.outputs.key }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
- name: Remove git auth | ||
run: git config --unset http.https://github.com/.extraheader | ||
- name: Generate yarn cache-key | ||
id: yarn-cache-key | ||
run: echo "::set-output name=key::${{ runner.os }}-yarn-ci-cache-v3-${{ hashFiles('./yarn.lock') }}-${{ hashFiles('**/yarn.lock') }}" | ||
- name: Configure Yarn cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ steps.yarn-cache-key.outputs.key }} | ||
path: | | ||
~/.cache/Cypress | ||
.yarn | ||
node_modules | ||
example/node_modules | ||
- name: Install dependencies | ||
if: ${{ github.actor != 'dependabot[bot]' || github.ref == 'refs/heads/main' }} | ||
run: yarn --immutable | ||
- name: Reset yarn.lock (due to dependabot incompatibility with yarn 3) | ||
if: ${{ github.actor == 'dependabot[bot]' && github.ref != 'refs/heads/main' }} | ||
run: "git checkout HEAD~1 yarn.lock" | ||
- name: Install dependencies & update yarn.lock (dependabot) | ||
if: ${{ github.actor == 'dependabot[bot]' && github.ref != 'refs/heads/main' }} | ||
run: "yarn install && git stage yarn.lock && git commit -m 'chore: update yarn.lock' && git push" | ||
env: | ||
YARN_ENABLE_IMMUTABLE_INSTALLS: false | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
|
||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
needs: cache | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
- name: remove git auth | ||
run: git config --unset http.https://github.com/.extraheader | ||
- name: Configure Yarn cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ needs.cache.outputs.yarn-cache-key }} | ||
path: | | ||
~/.cache/Cypress | ||
.yarn | ||
node_modules | ||
example/node_modules | ||
- name: Install dependencies | ||
run: yarn --immutable | ||
- name: Lint | ||
run: yarn lint:ci | ||
- name: Prettify | ||
run: yarn prettify:ci | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: pnpm lint:ci | ||
- run: pnpm format:ci | ||
|
||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
needs: cache | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
- name: remove git auth | ||
run: git config --unset http.https://github.com/.extraheader | ||
- name: Configure Yarn cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ needs.cache.outputs.yarn-cache-key }} | ||
path: | | ||
~/.cache/Cypress | ||
.yarn | ||
node_modules | ||
example/node_modules | ||
- name: Install dependencies | ||
run: yarn --immutable | ||
- name: Build plugin | ||
run: yarn build | ||
- name: Install example dependencies | ||
run: cd example && yarn --immutable | ||
cache: 'pnpm' | ||
- run: pnpm install && cd ./examples/webpack && pnpm cypress install | ||
- run: pnpm --filter cypress-plugin-visual-regression-diff -r build | ||
- name: Test e2e | ||
run: yarn test:e2e:ci | ||
run: pnpm test:e2e:ci | ||
- name: Test component-testing | ||
run: yarn test:ct:ci | ||
run: pnpm test:ct:ci | ||
|
||
test-integration-coverage: | ||
name: test-integration-coverage | ||
runs-on: ubuntu-latest | ||
needs: cache | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
- name: remove git auth | ||
run: git config --unset http.https://github.com/.extraheader | ||
- name: Configure Yarn cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ needs.cache.outputs.yarn-cache-key }} | ||
path: | | ||
~/.cache/Cypress | ||
.yarn | ||
node_modules | ||
example/node_modules | ||
- name: Install dependencies | ||
run: yarn --immutable | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Test integration (with coverage) and upload to CodeClimate | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
debug: true | ||
coverageCommand: yarn test:integration:ci | ||
coverageCommand: pnpm test:integration:ci | ||
coverageLocations: | | ||
${{github.workspace}}/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/*/coverage/lcov.info:lcov | ||
- name: Test integration (with coverage) | ||
if: ${{ github.ref != 'refs/heads/main' }} | ||
run: yarn test:integration:ci | ||
run: pnpm test:integration:ci | ||
|
||
build-and-release: | ||
name: build and release | ||
prepare-release: | ||
name: detect changes, bump package versions, generate changelog and commit it to main branch | ||
runs-on: ubuntu-latest | ||
needs: [cache, lint, test, test-integration-coverage] | ||
if: ${{ github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/main' && github.event_name == 'push' }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
outputs: | ||
releases_created: ${{ steps.release.outputs.releases_created }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: google-github-actions/[email protected] | ||
id: release | ||
with: | ||
# pulls all commits (needed for lerna / semantic release to correctly version) | ||
fetch-depth: "0" | ||
- name: Setup git user | ||
run: | | ||
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)" | ||
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)" | ||
command: manifest | ||
default-branch: main | ||
|
||
build-and-release: | ||
name: build and release | ||
runs-on: ubuntu-latest | ||
needs: prepare-release | ||
if: needs.prepare-release.outputs.releases_created | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
- name: remove git auth | ||
run: git config --unset http.https://github.com/.extraheader | ||
- name: Configure Yarn cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ needs.cache.outputs.yarn-cache-key }} | ||
path: | | ||
~/.cache/Cypress | ||
.yarn | ||
node_modules | ||
example/node_modules | ||
- name: Install dependencies | ||
run: yarn --immutable | ||
- name: Authenticate with Registry | ||
run: | | ||
yarn npm logout | ||
echo "registry=http://registry.npmjs.org/" >> .npmrc | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc | ||
npm whoami | ||
env: | ||
cache: 'pnpm' | ||
registry-url: 'https://registry.npmjs.org' | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: release package | ||
if: ${{ success() }} | ||
run: yarn release:ci | ||
- run: pnpm install | ||
- name: Build packages to get cross-references working 🔧 | ||
run: pnpm build | ||
- name: Release package | ||
run: pnpm release:ci | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,3 @@ | ||
{ | ||
"packages/cypress-plugin-visual-regression-diff": "3.3.9" | ||
} |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.