Skip to content

Commit

Permalink
feat: run CI on latest Node versions (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Oct 30, 2023
1 parent 9473850 commit c6fef5d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node_version: [16, 18]
node_version: [18, 20]
include:
- os: windows-latest
node_version: 16
node_version: 18
- os: macos-latest
node_version: 16
node_version: 18
fail-fast: false

name: 'Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
Expand Down
38 changes: 8 additions & 30 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,15 @@
name: 'Format Code'
name: Format

on:
workflow_dispatch:
push:
branches:
- main

jobs:
format:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- name: Check out code using Git
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# Needs access to push to main
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
- name: Setup PNPM
uses: pnpm/action-setup@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Format code
run: pnpm run format:ci
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[ci] format'
branch: ${{ github.head_ref }}
commit_user_name: fredkbot
commit_user_email: [email protected]
prettier:
if: github.repository_owner == 'withastro'
uses: withastro/automation/.github/workflows/format.yml@main
with:
command: "format:ci"
secrets: inherit

0 comments on commit c6fef5d

Please sign in to comment.