Skip to content

Commit

Permalink
ci: Update workflows
Browse files Browse the repository at this point in the history
- Update os to `ubuntu-latest`
- Update action versions
- Check duplication in lockfile
  • Loading branch information
tommy351 committed Feb 9, 2024
1 parent d627995 commit c540bf3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build packages
runs:
using: composite
steps:
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: turbo-${{ github.ref_name }}-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}
Expand Down
10 changes: 2 additions & 8 deletions .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@ inputs:
description: Node.js version
required: true
default: 20.x
pnpm-version:
description: pnpm version
required: true
default: 7.33.0

runs:
using: composite
steps:
- uses: pnpm/action-setup@v2
with:
version: ${{ inputs.pnpm-version }}
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: pnpm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:

jobs:
release:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install-deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:

jobs:
release:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'snapshot') }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/install-deps
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
- name: Check duplication in lockfile
run: pnpm dedupe --check
- uses: ./.github/actions/build-packages
- name: Lint files
run: pnpm run lint
Expand All @@ -21,9 +23,9 @@ jobs:
strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
os: [ubuntu-20.04, windows-latest]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
node-version: ${{ matrix.node-version }}
Expand All @@ -44,15 +46,15 @@ jobs:
run: pnpm run test:unit --coverage
- name: Run integration tests
run: pnpm run test:integration
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-browser:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-packages
- name: Run browser tests
Expand Down

0 comments on commit c540bf3

Please sign in to comment.