Skip to content

Commit

Permalink
feature: move lint-build-test to three jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
xiplias authored Mar 1, 2024
1 parent 101ddfa commit 51cd949
Showing 1 changed file with 58 additions and 4 deletions.
62 changes: 58 additions & 4 deletions .github/workflows/library-lint-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
type: string
default: '18'
jobs:
build:
name: Build, Lint and Test
build_packages:
name: Build npm package
runs-on: "ubuntu-latest"
env:
TURBO_TOKEN: ${{ secrets.turbo_token }}
Expand All @@ -39,9 +39,63 @@ jobs:

- name: Install dependencies
run: pnpm install
build_federation:
name: Build federation package
runs-on: "ubuntu-latest"
env:
TURBO_TOKEN: ${{ secrets.turbo_token }}
TURBO_TEAM: ${{ secrets.turbo_team }}
GH_PACKAGES_TOKEN: ${{ secrets.gh_packages_token }}
NPM_TOKEN: ${{ secrets.gh_packages_token }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: 8

- name: Build
run: pnpm build
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Install dependencies
run: pnpm build-federation
test:
name: Lint and Test
runs-on: "ubuntu-latest"
env:
TURBO_TOKEN: ${{ secrets.turbo_token }}
TURBO_TEAM: ${{ secrets.turbo_team }}
GH_PACKAGES_TOKEN: ${{ secrets.gh_packages_token }}
NPM_TOKEN: ${{ secrets.gh_packages_token }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm lint
Expand Down

0 comments on commit 51cd949

Please sign in to comment.