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

Add workflow that tests and checks #14

Merged
merged 5 commits into from
Oct 11, 2023
Merged

Add workflow that tests and checks #14

merged 5 commits into from
Oct 11, 2023

Conversation

abcd-ts
Copy link
Collaborator

@abcd-ts abcd-ts commented Oct 4, 2023

close #13

  1. 以下のコマンドを実行するワークフロー(.github/workflows/test.yml)を追加しました:
    • cargo check
    • cargo fmt
    • cargo test
    • cargo clippy
  2. ビルド前にテストを実行するように修正しました

@abcd-ts abcd-ts requested a review from tanzaku October 4, 2023 09:33
Comment on lines 31 to 32
- name: Execute test
run: cargo test --all
Copy link
Collaborator

Choose a reason for hiding this comment

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

ドキュメントを見たところ --all オプションはdeprecated (Deprecated alias for --workspace. ) とのことなので、--workspaceに直した方がよさそうです

Comment on lines 34 to 35
- name: Check test files diff
run: git diff --exit-code -- ${{ env.TEST_FILES_DST_DIR}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

env.TEST_FILES_DST_DIR を指定してdiffを調べるディレクトリを絞っていると思うのですが、テストの構成を変えた時に env.TEST_FILES_DST_DIR も合わせて変えなければならないため、保守の負担増に繋がってしまいそうです。
特に支障がなければ git diff --exit-code にして、対象のディレクトリを絞らないようにするのがいいのではと思いますが、いかがでしょうか。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

テストに関する部分以外が変更されるケースを懸念していましたが、そのような場合も問題ではあるので、対象を絞らないように変更しようと思います。

@tanzaku
Copy link
Collaborator

tanzaku commented Oct 5, 2023

@ota-meshi github actionsの修正があるので見ていただいてもいいでしょうか。

@tanzaku tanzaku merged commit d5cafeb into main Oct 11, 2023
@tanzaku tanzaku deleted the saito-improve-ci branch October 11, 2023 04:20
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.

Run tests in github actions
2 participants