Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dojo 53] CI にテストを追加 #34

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

[dojo 53] CI にテストを追加 #34

wants to merge 7 commits into from

Conversation

mkurom
Copy link
Collaborator

@mkurom mkurom commented Feb 10, 2025

Jira

https://alpha-dojo.atlassian.net/browse/DOJO-53

内容

  • PR時にtest が実行されるように設定
  • lint と共通部分は ci-setup.yaml に移動
  • test 失敗時には discord に通知(成功時は特になし)
  • lint, test は単独(手動)でも実行できるように設定しています

cache: 'pnpm'

- name: cache-node-modules
uses: actions/cache@v3
Copy link
Contributor

Choose a reason for hiding this comment

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

v4が最新のようですが、v3 の理由は何かありますか?

Copy link
Contributor

Choose a reason for hiding this comment

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

pnpm を使うと node_modulesディレクトリ以下には、ショートカットリンクしか残らないです。モジュール本体は、~/.pnpm-store にインストールされます。

なので ~/.pnpm-storeもキャッシュすると良いでしょう

- name: Cache pnpm store
  uses: actions/cache@v4
  with:
    path: ['~/.pnpm-store', 'node_modules']
    key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}


jobs:
test:
name: Test
Copy link
Contributor

Choose a reason for hiding this comment

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

Test だと目的が明確ではないですね。安田さんが実験するために置いたファイルなのか、npm testを実行するためのファイルなのかが分かりません。

Run test とかどうでしょうか。

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

Successfully merging this pull request may close these issues.

2 participants