Skip to content

Commit

Permalink
feat: wip visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
ericjansenrpm committed Aug 1, 2024
1 parent 6e089dc commit 0d8d0b6
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
push:
branches:
- main
- "feature/**"
- "feat/**"
- "hotfix/**"
- "ACT-**"
- 'feature/**'
- 'feat/**'
- 'hotfix/**'
- 'ACT-**'

concurrency:
group: ${{ github.ref }}
Expand All @@ -17,8 +17,8 @@ env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
linting:
name: Linting
test:
name: Unit Test + Linting + Storybook
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -29,11 +29,16 @@ jobs:
node-version: '18.x'
- name: Install deps
run: npm ci
- name: Run tests
run: npm run test
- name: Run storybook build
run: npm run build-storybook
- name: Run linter
run: npm run lint
tests:
name: Tests
runs-on: ubuntu-latest

visual-test:
name: Visual testing with baseline comparison
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -43,13 +48,16 @@ jobs:
node-version: '18.x'
- name: Install deps
run: npm ci
- name: Run tests
run: npm run test
- name: Run storybook build
run: npm run build-storybook
- name: Start dev server
run: npm run start
- uses: cypress-io/github-action@v6
with:
browser: chrome
headed: true
project: ./test/functional
build-and-deploy:
name: Build, Deploy to GitHub pages, Release npm package
needs: [linting, tests]
needs: [test, visual-test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' # Trigger release process only on main
steps:
Expand Down Expand Up @@ -83,4 +91,4 @@ jobs:
with:
branch: github-pages
folder: storybook-static
target-folder: docs
target-folder: docs

0 comments on commit 0d8d0b6

Please sign in to comment.