Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E: update .github pipelines dependencies #47

Merged
merged 2 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 20 additions & 27 deletions .github/workflows/protect-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,38 @@ on:
push:
# List all branches that shall be tested and are not protected by requiring pull requests to commit to.
branches:
- "develop"
- "main"
- 'develop'
- 'main'

jobs:
protect:
name: Protect stable
name: Protect stable
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
node-version: '18'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not 20?

cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: |
node_modules
packages/addons/node_modules
packages/cli/node_modules
packages/client/node_modules
packages/server/node_modules
packages/shared/node_modules
packages/test/node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install YARN dependencies
if: steps.cache-npm.outputs.cache-hit != 'true'
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: lint
Expand Down
41 changes: 17 additions & 24 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: yarn.lock

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
node-version: '18'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not 20?

cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: |
node_modules
packages/addons/node_modules
packages/cli/node_modules
packages/client/node_modules
packages/server/node_modules
packages/shared/node_modules
packages/test/node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install YARN dependencies
if: steps.cache-npm.outputs.cache-hit != 'true'
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: lint
Expand Down
96 changes: 44 additions & 52 deletions .github/workflows/release-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,51 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Create release and publish it
name: Create release and publish it

on:
push:
tags:
- 'v*'
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up Node for NPMJS Deployment
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: yarn.lock
registry-url: https://registry.npmjs.org/

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
node_modules
packages/addons/node_modules
packages/cli/node_modules
packages/client/node_modules
packages/server/node_modules
packages/shared/node_modules
packages/test/node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install YARN dependencies
if: steps.cache-npm.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: lint
run: yarn lint

- name: test
run: yarn test:ci

- name: build
run: yarn build

- name: E2E tests
run: yarn test:e2e
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '18'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install YARN dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: lint
run: yarn lint

- name: test
run: yarn test:ci

- name: build
run: yarn build

- name: E2E tests
run: yarn test:e2e
Loading