Skip to content

chore: use correct prettier version in ci #8321

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

Merged
merged 24 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
chore: fmt ci uses correct node setup
Add flag for node setup to allow not installing all node_modules
  • Loading branch information
Emyrk committed Jul 5, 2023
commit c46e06f3fde9a37e8b2c066013a9414e39dc892d
7 changes: 6 additions & 1 deletion .github/actions/setup-node/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: "Setup Node"
description: |
Sets up the node environment for tests, builds, etc.
inputs:
yarn-install-flags:
description: "Flags to pass to yarn install"
required: false
default: ""
runs:
using: "composite"
steps:
Expand All @@ -12,4 +17,4 @@ runs:
cache-dependency-path: "site/yarn.lock"
- name: Install node_modules
shell: bash
run: ./scripts/yarn_install.sh
run: ./scripts/yarn_install.sh ${{ inputs.yarn-install-flags }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to make sure this input is part of the cache key, otherwise we'll be hopping back-n-forth between prettier-only and full install?

Copy link
Member Author

@Emyrk Emyrk Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe that is why the cache is always taking 1minute.

I wonder if I even need to run install.sh

9 changes: 4 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: buildjet/setup-node@v3
- uses: ./.github/actions/setup-node
with:
node-version: 16.16.0
# Only install prettier dep for this job
yarn-install-flags: "prettier"


- uses: buildjet/setup-go@v4
with:
# This doesn't need caching. It's super fast anyways!
cache: false
go-version: 1.20.5

- name: Install prettier
run: npm install -g prettier

- name: Install shfmt
run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.5.0

Expand Down