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

Clean up GitHub Actions jobs #23

Open
freshgum-bubbles opened this issue Jun 25, 2023 · 2 comments
Open

Clean up GitHub Actions jobs #23

freshgum-bubbles opened this issue Jun 25, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed infrastructure Infrastructure changes (e.g. GitHub Actions)

Comments

@freshgum-bubbles
Copy link
Owner

freshgum-bubbles commented Jun 25, 2023

Currently the GitHub Actions CI workflow is... pretty ugly.
We copy-paste the Node+PNPM installer pretty much everywhere.

To attempt to fix this, I tried to make a reusable workflow which didn't go so well.

I'd really appreciate help from someone who actually knows how to use GitHub Actions.

- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8.6.1
- name: Set PNPM Cache Directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Restore PNPM Package Cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

@freshgum-bubbles freshgum-bubbles added enhancement New feature or request good first issue Good for newcomers infrastructure Infrastructure changes (e.g. GitHub Actions) help wanted Extra attention is needed labels Jun 25, 2023
@freshgum-bubbles freshgum-bubbles self-assigned this Sep 9, 2023
@rdonadono
Copy link

Hi,

Is your idea to optimize the installation phase of Node and PNPM and make it reusable in the other GH Actions?

I'll fork the project and take a look at it, if I solve it I'll open a PR for you.

@freshgum-bubbles
Copy link
Owner Author

Is your idea to optimize the installation phase of Node and PNPM and make it reusable in the other GH Actions?

Yeah, pretty much :-) I tried to do it myself (something something "Reusable workflows") but ended up baffled by the whole thing. It'd be really nice if there was a way to test Actions locally :/

#22, #15 and quite a few commits to the Workflows was as far as I got before the current, copy-paste situation.

If you're interested, there's another problem with Actions here which I don't have the wherewithall to fix: each one seems to run twice for pull requests (see #114 as an example). I'm sure that's burned through quite a lot of my minutes already, but alas :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed infrastructure Infrastructure changes (e.g. GitHub Actions)
Projects
None yet
Development

No branches or pull requests

2 participants