Skip to content

Commit

Permalink
Merge pull request #222 from commerce-docs/ds_upd-workflows
Browse files Browse the repository at this point in the history
Fix and update the test-pull-request workflow
  • Loading branch information
dshevtsov authored Dec 12, 2023
2 parents 32077bb + 1c26cfa commit bf40e81
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,42 +55,46 @@ jobs:
# Use full version number to avoid cases when a next
# released version is buggy
# About slim image: https://github.com/github/super-linter#slim-image
uses: super-linter/super-linter/slim@v5.4.3
uses: super-linter/super-linter/slim@v5.7.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: main
VALIDATE_ALL_CODEBASE: false
VALIDATE_GITHUB_ACTIONS: true

- name: Setup Node v16 for Yarn v3
- name: Setup Node v16
uses: actions/setup-node@v3
with:
node-version: '16.15.1' # Current LTS version
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Enable Corepack for Yarn v3
- name: Enable Corepack for Yarn
run: corepack enable

- name: Install Yarn v3
uses: borales/actions-yarn@v3
- name: Install Dependencies
run: yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Setup Node v16
uses: actions/setup-node@v3
with:
cmd: set version stable
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Install dependencies
uses: borales/actions-yarn@v3
- name: Enable Corepack for Yarn
run: corepack enable

- name: Install Dependencies
run: yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
with:
cmd: install


- name: Check links
uses: borales/actions-yarn@v3
with:
cmd: test
run: yarn test

- name: Build site
if: ${{ success() }}
uses: borales/actions-yarn@v3
with:
cmd: build
env:
NODE_OPTIONS: "--max_old_space_size=8192"
run: yarn build
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.20
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
"remark-validate-links": "^11.0.2"
},
"scripts": {
"start": "gatsby build && gatsby serve",
"start:prefix": "gatsby build --prefix-paths && gatsby serve --prefix-paths",
"dev": "gatsby develop --open",
"dev:https": "gatsby develop --https --host localhost.corp.adobe.com --port 9000",
"build": "gatsby build",
"serve": "gatsby serve",
"start": "NODE_OPTIONS='--max-old-space-size=8192' gatsby build && gatsby serve",
"start:prefix": "NODE_OPTIONS='--max-old-space-size=8192' gatsby build --prefix-paths && gatsby serve --prefix-paths",
"dev": "NODE_OPTIONS='--max-old-space-size=8192' gatsby develop",
"dev:https": "NODE_OPTIONS='--max-old-space-size=8192' gatsby develop --https --host localhost.corp.adobe.com --port 9000",
"build": "NODE_OPTIONS='--max-old-space-size=8192' gatsby build",
"serve": "NODE_OPTIONS='--max-old-space-size=8192' gatsby serve",
"clean": "gatsby clean",
"test": "remark src/pages --quiet --frail",
"lint": "docker run --rm -e RUN_LOCAL=true --env-file .github/super-linter.env -v \"$PWD\":/tmp/lint github/super-linter:slim-v5"
"lint": "docker run --rm -e RUN_LOCAL=true --env-file .github/super-linter.env -v \"$PWD\":/tmp/lint github/super-linter:slim-v4.10.1"
},
"packageManager": "[email protected]"
}

0 comments on commit bf40e81

Please sign in to comment.