Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ out
*.local
.nvmrc
biome.json
coverage

# Environment files
.env
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# default code owner
* @signature18632
22 changes: 7 additions & 15 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
## Summary
Closes #

* **What / Why (Background & Purpose)**
## 🎯 Changes

## Changes
What changes are made in this PR? Is it a feature or a bug fix?

* **Key Changes** (API / JOB / DB, etc.)
## ✅ Checklist

## Checklist

* [ ] `yarn format`
* [ ] `yarn test`
* [ ] Document any breaking changes
* [ ] Review from a security perspective (no sensitive information)

## Related

* Closes #
* Depends on #
- [ ] I have followed the steps listed in the [Contributing guide](https://github.com/InternetMaximalism/intmax2-function/blob/main/CONTRIBUTING.md).
- [ ] If necessary, I have added documentation related to the changes made.
- [ ] I have added or updated the tests related to the changes made.
43 changes: 43 additions & 0 deletions .github/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Setup Node + Yarn (with cache)
description: Enable Corepack, set Yarn version, restore Yarn cache, install deps
inputs:
node-version:
required: true
description: Node.js version
yarn-version:
required: true
description: Yarn Berry version

runs:
using: "composite"
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs['node-version'] }}

- name: Enable Corepack & set Yarn
shell: bash
run: |
corepack enable
corepack prepare yarn@${{ inputs['yarn-version'] }} --activate

- name: Get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"

- name: Restore Yarn cache
uses: actions/cache@v4
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
shell: bash
run: yarn install --immutable
43 changes: 43 additions & 0 deletions .github/workflows/ci-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI (dev with coverage)

on:
push:
branches: [dev]
paths-ignore:
- '**.md'

permissions:
contents: read

env:
NODE_VERSION: 24.5.0
YARN_VERSION: 4.9.2

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: ./.github/setup
with:
node-version: ${{ env.NODE_VERSION }}
yarn-version: ${{ env.YARN_VERSION }}

- name: Build shared packages
run: yarn build:shared

- name: Unit tests with coverage
run: yarn test --coverage

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/**
if-no-files-found: ignore
retention-days: 7
69 changes: 23 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: CI

on:
push:
branches: [dev]
pull_request:
branches: [dev]
paths-ignore:
Expand All @@ -11,57 +9,36 @@ on:
permissions:
contents: read

env:
NODE_VERSION: 24.5.0
YARN_VERSION: 4.9.2

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
runs-on: ubuntu-latest

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 24.5.0

- name: Enable Corepack
run: corepack enable

- name: Set Yarn version
run: corepack prepare yarn@4.9.2 --activate

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/checkout@v5

- name: Install dependencies
run: yarn install --immutable
- uses: ./.github/setup
with:
node-version: ${{ env.NODE_VERSION }}
yarn-version: ${{ env.YARN_VERSION }}

- name: Check formatting
run: yarn check
- name: Check formatting
run: yarn check

- name: Build shared packages
run: yarn build:shared
- name: Build shared packages
run: yarn build:shared

- name: Unit tests with coverage
run: yarn test --coverage
- name: Unit tests with coverage
run: yarn test --coverage

- name: Build
run: yarn build
- name: Build
run: yarn build

- name: Check for security vulnerabilities
run: yarn npm audit
- name: Check for security vulnerabilities
run: yarn npm audit
26 changes: 26 additions & 0 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release on tag

on:
push:
tags:
- "v*"
workflow_dispatch:

permissions:
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') }}