Skip to content

Commit

Permalink
👷 - ci: add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur committed Jan 8, 2024
1 parent 3df48f2 commit c808a26
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Run CI build and tests

# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
- main
tags:
- '*'
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:

concurrency:
group: '${{ github.workflow }}-${{ github.ref_name }}' # unique builds for branch/tag name
cancel-in-progress: false # do not cancel in progress, but only in-between builds

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: npm install

- name: Build source
run: npm run build

- name: build package
run: npm pack

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: npm install

- name: Run linters
run: npm run lint

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: npm install

- name: Serve storybook and run tests
run: |
cd storybook-static/ && tar -xvf artifact.tar && cd ..
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --quiet" \
"npx wait-on -l http://127.0.0.1:6006 && yarn test:storybook"

0 comments on commit c808a26

Please sign in to comment.