Skip to content

Commit

Permalink
fix(workflows): Adjust to run on correct branch
Browse files Browse the repository at this point in the history
Also temporarily disabling Cypress since we have no Cypress tests.
  • Loading branch information
rebeccaalpert committed Oct 24, 2024
1 parent 8788608 commit 0e9ed0b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 171 deletions.
100 changes: 10 additions & 90 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
node_modules
**/node_modules
key: ${{ runner.os }}-npm-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm install --frozen-lockfile
if: steps.npm-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -58,8 +58,8 @@ jobs:
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
node_modules
**/node_modules
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm install --frozen-lockfile
if: steps.npm-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -95,9 +95,9 @@ jobs:
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm install --frozen-lockfile
if: steps.npm-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -136,9 +136,9 @@ jobs:
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm install --frozen-lockfile
if: steps.npm-cache.outputs.cache-hit != 'true'
Expand All @@ -157,83 +157,3 @@ jobs:
run: npm run build:docs
- name: A11y tests
run: npm run serve:docs & npm run test:a11y
test_component:
runs-on: ubuntu-latest
env:
GH_PR_NUM: ${{ github.event.number }}
needs: build
steps:
- uses: actions/checkout@v4
# Yes, we really want to checkout the PR
- run: |
if [[ ! -z "${GH_PR_NUM}" ]]; then
echo "Checking out PR"
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: actions/cache@v4
id: npm-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm install --frozen-lockfile
if: steps.npm-cache.outputs.cache-hit != 'true'
- uses: actions/cache@v4
id: dist
name: Cache dist
with:
path: |
packages/*/dist
packages/react-styles/css
key: ${{ runner.os }}-dist-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json', 'package.json', 'packages/*/*', '!packages/*/dist', '!packages/*/node_modules') }}
- name: Build dist
run: npm run build
- name: Run component tests
run: npm run cypress:run:ci:cp
test_e2e:
runs-on: ubuntu-latest
env:
GH_PR_NUM: ${{ github.event.number }}
needs: build
steps:
- uses: actions/checkout@v4
# Yes, we really want to checkout the PR
- run: |
if [[ ! -z "${GH_PR_NUM}" ]]; then
echo "Checking out PR"
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: actions/cache@v4
id: npm-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm install --frozen-lockfile
if: steps.npm-cache.outputs.cache-hit != 'true'
- uses: actions/cache@v4
id: dist
name: Cache dist
with:
path: |
packages/*/dist
packages/react-styles/css
key: ${{ runner.os }}-dist-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json', 'package.json', 'packages/*/*', '!packages/*/dist', '!packages/*/node_modules') }}
- name: Build dist
run: npm run build
- name: Run component tests
run: npm run cypress:run:ci:e2e
2 changes: 1 addition & 1 deletion .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: check-pr
on:
pull_request:
branches:
- v6
- main
jobs:
call-build-lint-test-workflow:
uses: ./.github/workflows/build-lint-test.yml
2 changes: 1 addition & 1 deletion .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: promote
on:
push:
# Sequence of patterns matched against refs/tags
tags:
tags:
- v6.*
jobs:
build-and-promote:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm install --frozen-lockfile
if: steps.npm-cache.outputs.cache-hit != 'true'
Expand Down
Loading

0 comments on commit 0e9ed0b

Please sign in to comment.