Skip to content

Commit

Permalink
Improve CI workflow (#4016)
Browse files Browse the repository at this point in the history
  • Loading branch information
emlynmac authored Jan 16, 2024
1 parent e098818 commit cefe2d7
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 189 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/breaking-change-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,41 @@ concurrency:
jobs:
# get matrix for ci-jobs
get_matrix:
name: Set CI flavors
name: Load CI Matrix Details
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE so job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Ensure node version is great enough
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: 'lts/*'
- id: get-matrix
run: echo "matrix=$(node ./common/scripts/workflow-read-matrix.mjs)" >> $GITHUB_OUTPUT

check_breaking_changes:
needs: get_matrix
name: Check Breaking Changes
name: 'Check Breaking Changes (${{ matrix.flavor }})'
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE so job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
with:
fetch-depth: 0
# Ensure node version is great enough
- name: Use Node.js
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: 'lts/*'
# Try get node_modules from cache
- name: Restore node_modules from cache
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
Expand Down
Loading

0 comments on commit cefe2d7

Please sign in to comment.