Skip to content

Commit

Permalink
ci: Refactored cy workflow to rush
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh4 committed Jun 12, 2024
1 parent be62614 commit 7106aa9
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 95 deletions.
79 changes: 0 additions & 79 deletions .github/workflows/build.yml

This file was deleted.

95 changes: 79 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,90 @@
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "development" ]
jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Git config user
uses: snow-actions/[email protected]
fetch-depth: 0

- name: Cache Rush
uses: actions/cache@v2
with:
name: # Service Account's Name
email: # Service Account's Email Address
- uses: actions/setup-node@v3
path: |
common/temp/install-run
~/.rush
key: ${{ runner.os }}-${{ hashFiles('rush.json') }}
- name: Cache pnpm
uses: actions/cache@v2
with:
node-version: 16
- name: Verify Change Logs
run: node common/scripts/install-run-rush.js change --verify
path: |
common/temp/pnpm-store
key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'

#- name: Verify Change Logs
# run: node common/scripts/install-run-rush.js change --verify

- name: Rush Install
run: node common/scripts/install-run-rush.js install

- name: Rush rebuild
run: node common/scripts/install-run-rush.js rebuild --to tag:ci --verbose

#- name: Rush List
# run: node common/scripts/install-run-rush.js list --only git:HEAD~1
# run: node common/scripts/install-run-rush.js list --only git:HEAD~1

- name: Run Lint
run: node common/scripts/install-run-rush.js lint --to tag:ci --verbose
# run: node common/scripts/install-run-rush.js lint --to tag:ci --verbose --production
unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache Rush
uses: actions/cache@v2
with:
path: |
common/temp/install-run
~/.rush
key: ${{ runner.os }}-${{ hashFiles('rush.json') }}
- name: Cache pnpm
uses: actions/cache@v2
with:
path: |
common/temp/pnpm-store
key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'

#- name: Verify Change Logs
# run: node common/scripts/install-run-rush.js change --verify

- name: Rush Install
run: node common/scripts/install-run-rush.js install

- name: Rush rebuild
run: node common/scripts/install-run-rush.js rebuild --verbose --production
run: node common/scripts/install-run-rush.js rebuild --to tag:ci --verbose

#- name: Rush List
# run: node common/scripts/install-run-rush.js list --only git:HEAD~1
# run: node common/scripts/install-run-rush.js list --only git:HEAD~1

- name: Run Test
run: node common/scripts/install-run-rush.js test --to tag:ci --verbose
# run: node common/scripts/install-run-rush.js test --from git:HEAD~1 --verbose

0 comments on commit 7106aa9

Please sign in to comment.