mirror of
https://github.com/LukeHagar/plex-api-spec.git
synced 2025-12-09 20:47:46 +00:00
moved shared project setup to workflow step
This commit is contained in:
10
.github/workflows/build-and-copy-pms-spec.yml
vendored
10
.github/workflows/build-and-copy-pms-spec.yml
vendored
@@ -13,14 +13,10 @@ jobs:
|
||||
dereference_api:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout PR branch
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install Dependencies
|
||||
run: bun install
|
||||
- name: Project Setup
|
||||
uses: ./.github/workflows/steps/project-setup
|
||||
|
||||
- name: Dereference Plex Media Server Specification
|
||||
run: bun run build
|
||||
|
||||
10
.github/workflows/openapi-linting.yaml
vendored
10
.github/workflows/openapi-linting.yaml
vendored
@@ -8,14 +8,10 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout PR branch
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install Dependencies
|
||||
run: bun install
|
||||
- name: Project Setup
|
||||
uses: ./.github/workflows/steps/project-setup
|
||||
|
||||
- name: OpenAPI Lint
|
||||
run: bun run lint
|
||||
|
||||
26
.github/workflows/openapi-tests.yaml
vendored
26
.github/workflows/openapi-tests.yaml
vendored
@@ -6,22 +6,15 @@ name: Unit Tests
|
||||
- tests/**
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout PR branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install Dependencies
|
||||
run: bun install
|
||||
|
||||
unit-test:
|
||||
needs: setup
|
||||
name: Run Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Project Setup
|
||||
uses: ./.github/workflows/steps/project-setup
|
||||
|
||||
- name: Bundle OpenAPI Spec
|
||||
run: bun run build
|
||||
|
||||
@@ -29,8 +22,13 @@ jobs:
|
||||
run: bun run test
|
||||
|
||||
type-check:
|
||||
needs: setup
|
||||
name: Run Type Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Project Setup
|
||||
uses: ./.github/workflows/steps/project-setup
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: bun run type-check
|
||||
|
||||
13
.github/workflows/steps/project-setup/action.yaml
vendored
Normal file
13
.github/workflows/steps/project-setup/action.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: 'Project Setup'
|
||||
description: 'Setup Bun and install dependencies'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: "latest"
|
||||
- name: Clean install node_modules
|
||||
shell: bash
|
||||
run: bun install
|
||||
working-directory: src/WebAPI/ClientApp/
|
||||
Reference in New Issue
Block a user