Make minor workflow revisions and fix dedupe precommit (#15399)

This commit is contained in:
Steve Repsher 2023-02-14 07:03:16 -05:00 committed by GitHub
parent a13e2af17a
commit ec66e8331e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 38 deletions

View File

@ -33,9 +33,7 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build Cast
run: ./node_modules/.bin/gulp build-cast
@ -71,9 +69,7 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build Cast
run: ./node_modules/.bin/gulp build-cast
@ -87,4 +83,4 @@ jobs:
args: deploy --dir=cast/dist --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CAST_SITE_ID }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CAST_SITE_ID }}

View File

@ -15,8 +15,13 @@ env:
NODE_OPTIONS: --max_old_space_size=6144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint and check format
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
@ -27,20 +32,19 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Check for duplicate dependencies
run: yarn dedupe --check
- name: Build resources
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
- name: Run eslint
run: yarn run lint:eslint
run: yarn run lint:eslint --quiet
- name: Run tsc
run: yarn run lint:types
- name: Run prettier
run: yarn run lint:prettier
- name: Check for duplicate dependencies
run: yarn dedupe --check
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
@ -51,16 +55,15 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build resources
run: ./node_modules/.bin/gulp build-translations build-locale-data
- name: Run Tests
run: yarn run test
build:
runs-on: ubuntu-latest
name: Build frontend
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
@ -70,16 +73,15 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build Application
run: ./node_modules/.bin/gulp build-app
env:
IS_TEST: "true"
supervisor:
runs-on: ubuntu-latest
name: Build supervisor
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- name: Check out files from GitHub
uses: actions/checkout@v3.3.0
@ -89,9 +91,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build Application
run: ./node_modules/.bin/gulp build-hassio
env:

View File

@ -34,9 +34,7 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build Demo
run: ./node_modules/.bin/gulp build-demo
@ -72,9 +70,7 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build Demo
run: ./node_modules/.bin/gulp build-demo
@ -88,4 +84,4 @@ jobs:
args: deploy --dir=demo/dist --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_SITE_ID }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_SITE_ID }}

View File

@ -26,9 +26,7 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build Gallery
run: ./node_modules/.bin/gulp build-gallery

View File

@ -31,9 +31,7 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn install
env:
CI: true
run: yarn install --immutable
- name: Build Gallery
run: ./node_modules/.bin/gulp build-gallery

View File

@ -5,5 +5,5 @@ module.exports = {
'printf "%s\n" "Translation files should not be added or modified here. Instead, make the necessary modifications in src/translations/en.json. Other languages are managed externally. Please see https://developers.home-assistant.io/docs/translations/ for details." ' +
files.join(" ") +
" >&2 && exit 1",
"/yarn.lock": () => "yarn dedupe",
"yarn.lock": () => "yarn dedupe",
};