Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

feat: standardised CI/CD for smaller packages #48

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

grabbou
Copy link
Contributor

@grabbou grabbou commented Aug 30, 2023

This PR upgrades CI/CD setup based on prior work in widgets, web3-react and interface.

In a follow-up PR, prettier setup will be migrated over to Uniswap ESLint configuration and to use ESLint for linting for wider coverage.


Semantic release hasn't been tested yet. This PR is still a concept.


Action items:

  • Investigate maintenance options
  • Where to place README explaining the workflow and actions (and link them with the actions here)

uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is default registry.

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Node version number was bumped to 16. This is still TBD, I need to check the minimum version supported by this package. I want to read it dynamically from package.json "engines" so we have unification there.

using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This action caches global node_modules by default, when cache is present. I cleaned up the widgets version that had custom caching for readability and easier maintenance. I think we don't need a node_modules specific caching for smaller packages, Yarn will be fast anyway re-instantiating from global cache.

This is open discussion!

runs-on: ubuntu-latest
steps:
- uses: ./.github/actions/setup
- run: yarn deduplicate
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was debating whether we should contain all scripts this action runs within action, or use package.json scripts. Ended up moving entirely there to unify.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant