Skip to content

Commit

Permalink
Merge branch 'develop' into feat/timer
Browse files Browse the repository at this point in the history
  • Loading branch information
sumi-0011 committed Dec 1, 2023
2 parents 426cfb1 + 4c0bcf2 commit 23bc782
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/archive-stable-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Archive Stable Version

on:
workflow_dispatch:
schedule:
- cron: 0 19 * * *

jobs:
archiveStableVersion:
runs-on: ubuntu-latest
steps:
- name: Create Pull Request
id: cpr
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
try {
const result = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
labels: 'automerge',
title: '[auto-created] Daily up-to-date main branch',
head: 'release',
base: 'main',
});
const mergeResult = await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: result.data.number,
merge_method: 'merge',
})
} catch (error) {
core.setFailed('Action failed')
if (error?.message != 'No commits between master and release') {
return 'hasError'
}
}
47 changes: 47 additions & 0 deletions .github/workflows/check-if-mergeable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: check-if-mergeable

on:
pull_request:
types:
- opened
- synchronize
branches:
- 'develop'

jobs:
build:
name: check-if-mergeable
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/[email protected]

# node 세팅
- name: Init node
uses: actions/[email protected]
with:
node-version: '18.17.1'
cache: 'yarn'

- name: Set Yarn Version
id: set-version
run: |
yarn set version 4.0.2
echo "YARN_VERSION=$(yarn -v)" >> $GITHUB_OUTPUT
- name: Yarn Cache - PnP
uses: actions/cache@v2
with:
path: |
.yarn/cache
.pnp.*
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ steps.set-version.outputs.YARN_VERSION }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-
- name: Install dependencies
run: yarn install

- name: check-unit-test
run: yarn test ./src
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.17.1
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lint:fix": "next lint --fix",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"test": "jest --watch",
"test": "jest",
"test:watch": "jest --watch",
"test:ci": "jest --ci",
"test:coverage": "jest --coverage"
},
Expand Down
6 changes: 6 additions & 0 deletions src/services/index.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// pr 머지용 임시 테스트 코드
describe('test', () => {
test('test', () => {
expect(1).toBe(1);
});
});

0 comments on commit 23bc782

Please sign in to comment.