developmentseed / developmentseed/stac-react

Improve Github Action Workflow

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
34
Forks
4
PR merge metrics
No merged PRs in 30d

Description

@danielfdsilva spent time in #24 improving the GitHub workflow.
To keep our git history clean and make reviews easier, we should extract the workflow improvements into their own PR, based on the `develop` branch.

## GitHub Actions Workflow Updates (`.github/workflows/checks.yml`)

- [ ] Add descriptive header comments explaining the workflow purpose
- [x] Update trigger conditions:
- Remove `push` trigger on `main` branch
- Update `pull_request` types to: `opened`, `synchronize`, `reopened`, `ready_for_review`
- Add concurrency controls to cancel in-progress runs for the same ref
- [x] Update Node.js version strategy:
- Remove hardcoded `NODE` environment variable
- Use `node-version-file: '.nvmrc'` to read version from `.nvmrc` file
- [x] Update GitHub Actions to latest versions:
- `actions/checkout@v2` → `actions/checkout@v4`
- `actions/setup-node@v1` → `actions/setup-node@v4`
- `actions/cache@v2` → `actions/cache@v4`
- Remove deprecated `styfle/cancel-workflow-action` (replaced by concurrency)
- [x] Simplify cache key:
- Remove `cache-name` environment variable
- Use `${{ runner.os }}-build-${{ hashFiles('**/package.json') }}`
- [ ] Update job commands:
- Use explicit `yarn run lint` instead of `yarn lint`
- Use explicit `yarn run test` instead of `yarn test`
- Use explicit `yarn run build` instead of `yarn build`
- Fix build job step name: "Test" → "Build"
- [ ] Ensure `build` job depends on `test` job (not changed, but verify)

## References

- Original PR: #24
- Target branch: `develop`

## Notes

This is purely infrastructure/tooling changes with no functional code changes to the library itself.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.