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

ci: use v4 actions #1232

Merged
merged 1 commit into from
Dec 19, 2024
Merged
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
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
Loading