Skip to content

Commit

Permalink
ci: fix Running of webiny verify-dependencies command (#4484)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j authored Jan 10, 2025
1 parent 86eb11c commit 195acff
Show file tree
Hide file tree
Showing 17 changed files with 287 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .github/labeler-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

new-admin-ui:
- changed-files:
- any-glob-to-any-file: 'packages/admin-ui/**'
- any-glob-to-any-file: "packages/admin-ui/**"
2 changes: 1 addition & 1 deletion .github/workflows/chromaticStorybook.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Chromatic - Storybook Preview'
name: "Chromatic - Storybook Preview"

# The events that will trigger the action
on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Cloud infrastructure Cleanup
on:
workflow_dispatch:
repository_dispatch:
types: [ cleanup-infrastructure ]
types: [cleanup-infrastructure]
schedule:
- cron: "0 2 * * *" # Every day at 2AM.

Expand Down
70 changes: 35 additions & 35 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# The branches below must be a subset of the branches above
branches: [next]
schedule:
- cron: '0 15 * * 2'
- cron: "0 15 * * 2"

jobs:
analyze:
Expand All @@ -24,48 +24,48 @@ jobs:
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['javascript']
language: ["javascript"]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GH_TOKEN }}
configuration-path: .github/labeler-config.yml
configuration-path: .github/labeler-config.yml
65 changes: 49 additions & 16 deletions .github/workflows/pullRequests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# and run "github-actions-wac build" (or "ghawac build") to regenerate this file.
# For more information, run "github-actions-wac --help".
name: Pull Requests
'on': pull_request
"on": pull_request
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand All @@ -19,7 +19,7 @@ jobs:
- uses: webiny/[email protected]
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
validateCommitsDev:
name: Validate commit messages (dev branch, 'feat' commits not allowed)
Expand All @@ -34,7 +34,7 @@ jobs:
allowed-commit-types: fix,docs,style,refactor,test,build,perf,ci,chore,revert,merge,wip
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
constants:
name: Create constants
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
$GITHUB_OUTPUT
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
assignMilestone:
name: Assign milestone
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
milestone: ${{ steps.get-milestone-to-assign.outputs.milestone }}
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
build:
name: Build
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
path: ${{ github.base_ref }}/.webiny/cached-packages
key: ${{ needs.constants.outputs.run-cache-key }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
staticCodeAnalysis:
needs:
Expand Down Expand Up @@ -190,7 +190,40 @@ jobs:
working-directory: ${{ github.base_ref }}
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
staticCodeAnalysisVerifyDependencies:
needs:
- constants
- build
name: Static code analysis (verify dependencies)
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/checkout@v4
with:
path: ${{ github.base_ref }}
- uses: actions/cache@v4
with:
path: ${{ github.base_ref }}/.yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- uses: actions/cache@v4
with:
path: ${{ github.base_ref }}/.webiny/cached-packages
key: ${{ needs.constants.outputs.run-cache-key }}
- name: Install dependencies
run: yarn --immutable
working-directory: ${{ github.base_ref }}
- name: Build packages
run: yarn build:quick
working-directory: ${{ github.base_ref }}
- name: Sync Dependencies Verification
run: yarn webiny verify-dependencies
working-directory: ${{ github.base_ref }}
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
staticCodeAnalysisTs:
name: Static code analysis (TypeScript)
Expand All @@ -216,7 +249,7 @@ jobs:
run: yarn cy:ts
working-directory: ${{ github.base_ref }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jestTestsNoStorageConstants:
needs:
Expand Down Expand Up @@ -244,7 +277,7 @@ jobs:
echo '${{
steps.list-packages-to-jest-test.outputs.packages-to-jest-test }}'
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jestTestsNoStorageRun:
needs:
Expand All @@ -265,7 +298,7 @@ jobs:
}}
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
AWS_REGION: eu-central-1
if: needs.jestTestsNoStorageConstants.outputs.packages-to-jest-test != '[]'
Expand Down Expand Up @@ -363,7 +396,7 @@ jobs:
echo '${{
steps.list-packages-to-jest-test.outputs.packages-to-jest-test }}'
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jestTestsddbRun:
needs:
Expand All @@ -383,7 +416,7 @@ jobs:
fromJson(needs.jestTestsddbConstants.outputs.packages-to-jest-test) }}
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
AWS_REGION: eu-central-1
if: needs.jestTestsddbConstants.outputs.packages-to-jest-test != '[]'
Expand Down Expand Up @@ -480,7 +513,7 @@ jobs:
echo '${{
steps.list-packages-to-jest-test.outputs.packages-to-jest-test }}'
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jestTestsddb-esRun:
needs:
Expand All @@ -501,7 +534,7 @@ jobs:
}}
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
AWS_REGION: eu-central-1
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
Expand Down Expand Up @@ -610,7 +643,7 @@ jobs:
echo '${{
steps.list-packages-to-jest-test.outputs.packages-to-jest-test }}'
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jestTestsddb-osRun:
needs:
Expand All @@ -631,7 +664,7 @@ jobs:
}}
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_OPTIONS: "--max_old_space_size=4096"
YARN_ENABLE_IMMUTABLE_INSTALLS: false
AWS_REGION: eu-central-1
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_OPEN_SEARCH_DOMAIN_NAME }}
Expand Down
Loading

0 comments on commit 195acff

Please sign in to comment.