Update README.md #45
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
name: Makefile CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
Build_and_Test: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
# Pythonの環境をセットアップ | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
# 必要なパッケージをインストール | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest numpy scipy | |
- name: Build | |
run: make | |
- name: Test | |
run: make tests | |
# テスト結果をアップロードする | |
- name: Upload results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test_results | |
path: tests/*/*.xml | |
# テスト結果をダウンロードする | |
- name: Download results | |
uses: actions/download-artifact@v4 | |
with: | |
name: test_results | |
path: artifacts | |
# テスト結果をGitHub上で表示する | |
- name: Display results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: artifacts/**/*.xml |