Archived
1
0

refactor: remove prebuild

This commit is contained in:
Joe Previte 2022-09-16 22:42:28 -07:00
parent fe70ebf4d6
commit bbfbab40db
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24

View File

@ -22,10 +22,10 @@ concurrency:
# will skip running `yarn install` if it successfully fetched from cache # will skip running `yarn install` if it successfully fetched from cache
jobs: jobs:
prebuild: fmt:
name: Pre-build checks name: Format with Prettier
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 5
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -47,18 +47,49 @@ jobs:
id: cache-node-modules id: cache-node-modules
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: "**/node_modules" path: "node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }} key: yarn-build-${{ hashFiles('yarn.lock') }}
restore-keys: | restore-keys: |
yarn-build- yarn-build-
- name: Install dependencies - name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true' if: steps.cache-yarn.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Run yarn fmt - name: Format files with Prettier
run: yarn fmt run: yarn fmt
if: success()
- name: Fail workflow
if: failure()
uses: andymckay/cancel-action@0.2
lint-helm:
name: Lint Helm chart
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v23.2
with:
files: |
ci/helm-chart/**
- name: Install helm
uses: azure/setup-helm@v3.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Lint Helm chart
if: steps.changed-files.outputs.any_changed == 'true'
run: ./ci/dev/helm.sh
- name: Fail workflow
if: failure()
uses: andymckay/cancel-action@0.2
lint-sh: lint-sh:
name: Lint shell files name: Lint shell files
@ -104,49 +135,6 @@ jobs:
if: failure() if: failure()
uses: andymckay/cancel-action@0.2 uses: andymckay/cancel-action@0.2
typecheck:
name: Check TypeScript types
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v23.2
with:
files: |
./src/**/*
- name: Install Node.js v16
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Fetch dependencies from cache
if: steps.changed-files.outputs.any_changed == 'true'
id: cache-yarn
uses: actions/cache@v3
with:
path: "node_modules"
key: yarn-build-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-yarn.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Run tsc on TypeScript files
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn typecheck
- name: Fail workflow
if: failure()
uses: andymckay/cancel-action@0.2
lint-ts: lint-ts:
name: Lint TypeScript files name: Lint TypeScript files
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -194,8 +182,8 @@ jobs:
if: failure() if: failure()
uses: andymckay/cancel-action@0.2 uses: andymckay/cancel-action@0.2
lint-helm: typecheck:
name: Lint Helm chart name: Check TypeScript types
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
@ -207,16 +195,31 @@ jobs:
uses: tj-actions/changed-files@v23.2 uses: tj-actions/changed-files@v23.2
with: with:
files: | files: |
ci/helm-chart/** ./src/**/*
- name: Install helm - name: Install Node.js v16
uses: azure/setup-helm@v3.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Lint Helm chart
if: steps.changed-files.outputs.any_changed == 'true' if: steps.changed-files.outputs.any_changed == 'true'
run: ./ci/dev/helm.sh uses: actions/setup-node@v3
with:
node-version: "16"
- name: Fetch dependencies from cache
if: steps.changed-files.outputs.any_changed == 'true'
id: cache-yarn
uses: actions/cache@v3
with:
path: "node_modules"
key: yarn-build-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-yarn.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Run tsc on TypeScript files
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn typecheck
- name: Fail workflow - name: Fail workflow
if: failure() if: failure()
@ -224,7 +227,6 @@ jobs:
build: build:
name: Build name: Build
needs: prebuild
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
env: env: