-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into junya/docs/init
- Loading branch information
Showing
20 changed files
with
812 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore everything in the root except some files | ||
/* | ||
|
||
# Unignore all files in the src directory | ||
!src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
test: | ||
- "src/*.test.ts" | ||
- "src/**/*.test.ts" | ||
- "src/*.spec.ts" | ||
- "src/**/*.spec.ts" | ||
|
||
documentation: | ||
- "**/*.md" | ||
- "**/*.txt" | ||
|
||
dependencies: | ||
- "**/package.json" | ||
- "**/yarn.lock" | ||
|
||
infrastructure: | ||
- "**/Dockerfile" | ||
- "**/compose.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
changelog: | ||
categories: | ||
- title: "🚀 Features" | ||
labels: | ||
- enhancement | ||
- feature | ||
|
||
- title: "🐛 Bug Fixes" | ||
labels: | ||
- bug | ||
- fix | ||
- hotfix | ||
- bugfix | ||
|
||
- title: "🧰 Maintenance" | ||
labels: | ||
- maintenance | ||
- refactor | ||
- chore | ||
|
||
- title: "📝 Documentation" | ||
labels: | ||
- documentation | ||
|
||
- title: "🏗️ Infrastructure" | ||
labels: | ||
- infrastructure | ||
|
||
- title: "🧪 Tests" | ||
labels: | ||
- test | ||
|
||
- title: "📦 Dependencies" | ||
labels: | ||
- dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: 'CodeQL' | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 0' # Run at 00:00 UTC on Sunday | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ['javascript'] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Use only 'java' to analyze code written in Java, Kotlin or both | ||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: '/language:${{matrix.language}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: cleanup caches by a branch | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cleanup | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
REPO=${{ github.repository }} | ||
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" | ||
echo "Fetching list of cache key" | ||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) | ||
## Setting this to not fail the workflow while deleting cache keys. | ||
set +e | ||
echo "Deleting caches..." | ||
if [ -z "$cacheKeysForPR" ] | ||
then | ||
echo "No cache keys found for $BRANCH" | ||
exit 0 | ||
fi | ||
for cacheKey in $cacheKeysForPR | ||
do | ||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm | ||
done | ||
echo "Done" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Pull Request Labeler | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
triage: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Monthly issue metrics | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# Run on the first day of every month at 00:00 JST (UTC+9) | ||
- cron: '0 15 1 * *' | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: read | ||
|
||
jobs: | ||
build: | ||
name: issue metrics | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get dates for last month | ||
shell: bash | ||
run: | | ||
# Calculate the first day of the previous month | ||
first_day=$(date -d "last month" +%Y-%m-01) | ||
# Calculate the last day of the previous month | ||
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) | ||
#Set an environment variable with the date range | ||
echo "$first_day..$last_day" | ||
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" | ||
- name: Run issue-metrics tool | ||
uses: github/issue-metrics@v2 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SEARCH_QUERY: 'repo:Okabe-Junya/issue-validator is:issue is:pr created:${{ env.last_month }} -reason:"not planned"' | ||
|
||
- name: Create issue | ||
uses: peter-evans/create-issue-from-file@v4 | ||
with: | ||
title: Monthly issue metrics report | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
content-filepath: ./issue_metrics.md | ||
assignees: <YOUR_GITHUB_HANDLE_HERE> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: reviewdog eslint | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: reviewdog/action-eslint@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-review | ||
eslint_flags: "--ext .ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: jest test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install Dependencies with Yarn | ||
run: yarn install | ||
|
||
- name: Cache Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node/ci-dependency/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }} | ||
|
||
test: | ||
needs: setup | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18, 20] | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Cache Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node/ci-dependency/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Run Tests | ||
run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore everything in the root except some files | ||
/* | ||
|
||
# Unignore all files in the src directory | ||
!src/ |
Oops, something went wrong.