Skip to content

Commit

Permalink
chore: update workflows to use cache and --continue flag (#2584)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Schultz <pschultz@pobox.com>
  • Loading branch information
schultzp2020 authored Dec 3, 2024
1 parent 7643bda commit 4fc79cf
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 66 deletions.
28 changes: 14 additions & 14 deletions .github/actions/build/action.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Build packages
description: Build packages
inputs:
args:
description: Backstage CLI repo build arguments
default: --filter=@janus-idp/*

runs:
using: 'composite'
steps:
- name: Build packages
shell: bash
run: |
yarn run build --concurrency=75% ${{ inputs.args }}
name: Build packages
description: Build packages
inputs:
args:
description: Backstage CLI repo build arguments
default: --filter=@janus-idp/*

runs:
using: 'composite'
steps:
- name: Build packages
shell: bash
run: |
yarn run build --continue ${{ inputs.args }}
6 changes: 3 additions & 3 deletions .github/actions/test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ runs:
steps:
- name: Run prettier
shell: bash
run: yarn prettier:check --concurrency=75% ${{ inputs.args }}
run: yarn prettier:check --continue ${{ inputs.args }}

- name: Run lint
shell: bash
run: yarn run lint:check --concurrency=75% ${{ inputs.args }}
run: yarn run lint:check --continue ${{ inputs.args }}

- name: Run tests
shell: bash
run: yarn run test --concurrency=75% ${{ inputs.args }}
run: yarn run test --continue ${{ inputs.args }}
35 changes: 0 additions & 35 deletions .github/actions/yarn-lock/action.yaml

This file was deleted.

20 changes: 10 additions & 10 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Setup local Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1

- name: Install dependencies
run: |
yarn install
uses: backstage/actions/yarn-install@25145dd4117d50e1da9330e9ed2893bc6b75373e # v0.6.15
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}

- name: Build packages
uses: ./.github/actions/build
Expand All @@ -61,14 +61,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Setup local Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1

- name: Install dependencies
run: |
yarn install
uses: backstage/actions/yarn-install@25145dd4117d50e1da9330e9ed2893bc6b75373e # v0.6.15
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}

- name: Verify changesets
if: ${{ !(github.actor == 'janus-idp[bot]' || github.actor == 'github-actions[bot]') }}
Expand Down Expand Up @@ -97,14 +97,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Setup local Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1

- name: Install dependencies
run: |
yarn install
uses: backstage/actions/yarn-install@25145dd4117d50e1da9330e9ed2893bc6b75373e # v0.6.15
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}

- name: Install playwright
run: npx playwright install --with-deps chromium
Expand All @@ -114,7 +114,7 @@ jobs:
# enable permission support and RBAC plugins
printf "\npermission:\n enabled: true\n" >> $(pwd)/app-config.yaml
yarn run ui-test --affected
yarn run ui-test --affected --continue
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4
if: ${{ !cancelled() }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
shell: bash
run: |
yarn install
uses: backstage/actions/yarn-install@25145dd4117d50e1da9330e9ed2893bc6b75373e # v0.6.15
with:
cache-prefix: ${{ runner.os }}-v20

- name: Creating .npmrc
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/update-backstage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ jobs:
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: yarn install
uses: backstage/actions/yarn-install@25145dd4117d50e1da9330e9ed2893bc6b75373e # v0.6.15
with:
cache-prefix: ${{ runner.os }}-v20

- name: Run versons:bump script
run: |
Expand Down

0 comments on commit 4fc79cf

Please sign in to comment.