Skip to content

Commit

Permalink
chore: resolves merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
soykje committed Aug 1, 2024
2 parents 81cfab2 + fc8256f commit 99a3ed2
Show file tree
Hide file tree
Showing 98 changed files with 1,294 additions and 388 deletions.
21 changes: 21 additions & 0 deletions .github/composite-actions/a11y/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Accessibility checking'
description: 'Build and serve Storybook pages then check accessibility'
runs:
using: composite
steps:
- name: Install
uses: ./.github/composite-actions/install

- name: Build Project Artifacts
shell: bash
run: npm run storybook:build

- name: Serve Storybook files
uses: Eun/http-server-action@v1
with:
directory: ./dist
port: 6006

- name: Accessibility checking
shell: bash
run: node bin/check-a11y.js -f ${{ steps.files.outputs.all_changed_files }}
21 changes: 21 additions & 0 deletions .github/composite-actions/e2e/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'E2E testing'
description: 'Setup Playwright and run E2E tests'
runs:
using: composite
steps:
- name: Install
uses: ./.github/composite-actions/install

- name: Install Playwright Browsers
shell: bash
run: npx playwright install --with-deps

- name: Run Playwright tests
shell: bash
run: npm run test:e2e

- uses: actions/upload-artifact@v4
with:
name: e2e-report
path: 'e2e/report/'
retention-days: 30
27 changes: 0 additions & 27 deletions .github/workflows/playwright.yml

This file was deleted.

74 changes: 39 additions & 35 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
assign-pr-owner:
runs-on: ubuntu-latest
Expand All @@ -20,36 +21,45 @@ jobs:
if: github.event_name == 'pull_request' && github.event.action == 'opened'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install
uses: ./.github/composite-actions/install

- name: Lint
run: npm run lint

typecheck:
runs-on: ubuntu-latest
name: Typecheck
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install
uses: ./.github/composite-actions/install

- name: Type checking
run: npm run typecheck

test:
runs-on: ubuntu-latest
name: Test
name: Unit tests
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install
uses: ./.github/composite-actions/install
Expand All @@ -65,9 +75,11 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
name: Codecov UI
codecov_yml_path: ./.codecov.yml
a11y:

test-e2e:
runs-on: ubuntu-latest
name: Accessibility
name: E2E tests
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -76,50 +88,38 @@ jobs:

- name: Get changed files
uses: tj-actions/changed-files@v41
id: files
id: e2efiles
with:
files: ./packages/components/**/*.{ts,tsx,mdx,json}

- name: Install
if: steps.files.outputs.all_changed_files_count > 0
uses: ./.github/composite-actions/install

- name: Build Project Artifacts
if: steps.files.outputs.all_changed_files_count > 0
run: npm run storybook:build
files: |
./e2e/**/*.{ts,tsx}
./packages/components/**/*.{ts,tsx,mdx,json}
- name: Serve Storybook files
if: steps.files.outputs.all_changed_files_count > 0
uses: Eun/http-server-action@v1
with:
directory: ./dist
port: 6006
- name: E2E testing
if: steps.e2efiles.outputs.all_changed_files_count > 0
uses: ./.github/composite-actions/e2e

- name: Accessibility checking
if: steps.files.outputs.all_changed_files_count > 0
run: node bin/check-a11y.js -f ${{ steps.files.outputs.all_changed_files }}
visual-testing:
a11y:
runs-on: ubuntu-latest
name: Visual testing
name: Accessibility
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install
uses: ./.github/composite-actions/install

- name: Publish to Chromatic
uses: chromaui/action@v1
- name: Get changed files
uses: tj-actions/changed-files@v41
id: files
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: 'storybook:build'
onlyChanged: true
untraced: 'packages/utils/\*\*"'
files: ./packages/components/**/*.{ts,tsx,mdx,json}

- name: Accessibility checking
if: steps.files.outputs.all_changed_files_count > 0
uses: ./.github/composite-actions/a11y

deploy:
runs-on: ubuntu-latest
name: Deploy
name: Deployment
environment:
name: ${{ github.event_name != 'pull_request' && 'Production' || 'Preview'}}
url: ${{ steps.deployment.outputs.url }}
Expand Down Expand Up @@ -150,11 +150,15 @@ jobs:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{secrets.VERCEL_TOKEN}}

security:
name: Security
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run Lava Action
uses: adevinta/lava-action@v0
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ coverage
*.sln
*.sw?
.nx

# Testing reports
/test-results/
/playwright-report/
/e2e/report/
/blob-report/
/playwright/.cache/
/playwright/.cache/
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [5.0.16](https://github.com/adevinta/spark/compare/v5.0.15...v5.0.16) (2024-08-01)

### Bug Fixes

- fix gha composite actions ([94beedf](https://github.com/adevinta/spark/commit/94beedf70abd9dff3c15fdf369c32a7175a6d49c))

## [5.0.15](https://github.com/adevinta/spark/compare/v5.0.14...v5.0.15) (2024-08-01)

**Note:** Version bump only for package spark

## [5.0.14](https://github.com/adevinta/spark/compare/v5.0.13...v5.0.14) (2024-08-01)

**Note:** Version bump only for package spark

## [5.0.13](https://github.com/adevinta/spark/compare/v5.0.12...v5.0.13) (2024-08-01)

**Note:** Version bump only for package spark

## [5.0.12](https://github.com/adevinta/spark/compare/v5.0.11...v5.0.12) (2024-08-01)

**Note:** Version bump only for package spark

## [5.0.11](https://github.com/adevinta/spark/compare/v5.0.10...v5.0.11) (2024-07-30)

**Note:** Version bump only for package spark
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "5.0.11",
"version": "5.0.16",
"command": {
"publish": {
"conventionalCommits": true,
Expand Down
Loading

0 comments on commit 99a3ed2

Please sign in to comment.