Skip to content

Commit

Permalink
ci: 🎡 update ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharkazaz committed Sep 17, 2024
1 parent fdcf536 commit eaec2d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 45 deletions.
8 changes: 4 additions & 4 deletions .github/actions/step-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'Checkout, Setup Node and install dependencies'
description: 'Checkout, Setup Node and install dependencies'
name: 'Setup Node and install dependencies'
description: 'Setup Node and install dependencies'

runs:
using: composite
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm

- name: Install dependencies
Expand Down
51 changes: 10 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,27 @@ name: CI
on: [push, pull_request]

jobs:
build:
ci-step:
strategy:
matrix:
target: [ci:build, ci:test, ci:lint, ci:e2e, build:docs]
runs-on: ubuntu-latest
name: ${{ matrix.target }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/step-setup

- name: Build libs & apps
run: npm run ci:build

- name: Build docs
run: cd docs && npm i && npm run build

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/step-setup

- name: Run tests
run: npm run ci:test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/step-setup

- name: Run lint
run: npm run ci:lint

e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/step-setup

- name: Run E2E
run: npm run ci:e2e
- name: Run ${{ matrix.target }}
run: npm run ${{ matrix.target }}
shell: bash

commitlint:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down

0 comments on commit eaec2d7

Please sign in to comment.