Skip to content

Commit

Permalink
ci: use v4 actions (#1232)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbouliol authored Dec 19, 2024
1 parent 0033fff commit f5272dd
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
steps:
- name: Cancel previous running workflows
uses: fkirc/skip-duplicate-actions@master
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.14.0
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
node_modules
Expand All @@ -37,7 +37,7 @@ jobs:
run: yarn && yarn bootstrap --ci
- name: Build
run: yarn build
- uses: actions/cache/save@v3
- uses: actions/cache/save@v4
with:
path: packages/*/dist
key: ${{ runner.os }}-build-${{ github.sha }}
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint commit message
Expand Down Expand Up @@ -76,23 +76,23 @@ jobs:
- plugin-export-advanced
- plugin-flattener
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.14.0
- name: Start docker containers
if: ${{ matrix.package == 'datasource-mongo' || matrix.package == 'datasource-mongoose' || matrix.package == 'datasource-sql' || matrix.package == 'datasource-sequelize' }}
run: docker compose -f ./packages/${{ matrix.package }}/docker-compose.yml up -d; sleep 5
- name: Restore dependencies from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/*/package.json') }}
fail-on-cache-miss: true
- name: Restore build from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: packages/*/dist
key: ${{ runner.os }}-build-${{ github.sha }}
Expand All @@ -102,7 +102,7 @@ jobs:
- name: Test code
run: cd packages/${{ matrix.package }} && yarn test --coverage && cd -
- name: Upload coverage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package }}
path: packages/${{ matrix.package }}/coverage/clover.xml
Expand All @@ -114,9 +114,9 @@ jobs:
timeout-minutes: 10
needs: [test]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@v4
- name: Download coverage reports
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: reports
- name: Send coverage
Expand All @@ -132,20 +132,20 @@ jobs:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.14.0
- name: Restore dependencies from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/*/package.json') }}
fail-on-cache-miss: true
- name: Restore build from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: packages/*/dist
key: ${{ runner.os }}-build-${{ github.sha }}
Expand All @@ -171,23 +171,23 @@ jobs:
|| startsWith(github.ref, 'refs/heads/beta-')
)
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false # GITHUB_TOKEN must not be set for the semantic release
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.14.0
- name: Restore dependencies from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/*/package.json') }}
fail-on-cache-miss: true
- name: Restore build from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: packages/*/dist
key: ${{ runner.os }}-build-${{ github.sha }}
Expand Down

0 comments on commit f5272dd

Please sign in to comment.