Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 62 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
name: Test component
on: push
name: Deploy harsh-ui package
on: [push, workflow_dispatch]

jobs:
test:
timeout-minutes: 7
runs-on: ubuntu-latest
steps:
- name: Get the harsh-ui reposistory
uses: actions/checkout@v3
- name: check
if: github.event_name == 'release'
run: echo "This will not execute"
- name: check1
run: echo "will this execute"
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: node_modules
key: deps_node_modules-deps-${{ hashFiles('package-lock.json')}}
- name: Install dependencies
run: npm i
if: steps.cache.outputs.cache-hit !='true'
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
Expand All @@ -18,3 +30,49 @@ jobs:
npx concurrently -k -s first -n "SB,Test" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --slient" \
"npx wait-on tcp:127.0.0.1:6006 && npm run test-storybook"

build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Get the harsh-ui reposistory
uses: actions/checkout@v3
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: node_modules
key: deps_node_modules-deps-${{ hashFiles('package-lock.json')}}
- name: Install dependencies
if: steps.cache.outputs.cache-hit !='true'
run: npm ci
- name: Build harsh-ui
run: npm run build-lib
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dist-files
path: |
hooks.js
icons.js
index.js

deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Get the build-artifacts
uses: actions/download-artifact@v3
with:
name: dist-files
- name: Output the contents
run: ls
- name: Deploy
run: echo "Deploying..."
report:
needs: [test, deploy]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Ouput Infromation
run: echo "Something went wrong"
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ yarn-error.log*

node_modules

harsh-ui*

package-lock.json
harsh-ui*
Loading