Skip to content

Merge pull request #24 from Opetushallitus/OK-674 #260

Merge pull request #24 from Opetushallitus/OK-674

Merge pull request #24 from Opetushallitus/OK-674 #260

Workflow file for this run

name: oph-design-system
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
check-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-storybook
with:
params: --test
- name: Lint
run: |
npm run typecheck
npm run lint
npm run prettier
- name: Run unit tests
run: npm run test:coverage
test-playwright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-storybook
with:
params: --test
- name: Test running example project with library import
run: cd example; npm run start-and-test-docker
- name: Start and test storybook
run: npm run start-and-test-storybook-docker
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
test-results
!test-results/.last-run.json
retention-days: 10
if-no-files-found: ignore
build:
needs: [check-and-test, test-playwright]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-storybook
if: github.ref == 'refs/heads/main'
- uses: ./.github/actions/deploy-storybook
if: github.ref == 'refs/heads/main'