mirror of
https://github.com/tex2e/rfc-translater.git
synced 2025-12-20 00:54:10 +08:00
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
|
|
name: Python Unittest
|
|
|
|
# Controls when the workflow will run
|
|
on:
|
|
# Triggers the workflow on push or pull request events but only for the "master" branch
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
unittest:
|
|
# The type of runner that the job will run on
|
|
runs-on: ubuntu-latest
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v4
|
|
|
|
# Python環境をセットアップ
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
# ライブラリのインストール
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r scraping-app/requirements.txt
|
|
|
|
# Unittestの実行
|
|
- name: Run unittest
|
|
run: |
|
|
python -m unittest discover -s tests -p "test_*.py"
|