瀏覽代碼

ci: add run test job

pull/192/head
mingrammer 4 年之前
父節點
當前提交
362964de79
共有 1 個文件被更改,包括 31 次插入0 次删除
  1. +31
    -0
      .github/workflows/test.yml

+ 31
- 0
.github/workflows/test.yml 查看文件

@@ -0,0 +1,31 @@
name: Run tests

on:
push:
branches:
- master
paths:
- '**.py'
pull_request:
branches:
- master
paths:
- '**.py'

jobs:
test:
strategy:
matrix:
python: ['3.6', '3.7', '3.8']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install poetry
run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
- name: Install libraries
run: poetry install
- name: Run all tests
run: python -m unittest -v tests/*.py

Loading…
取消
儲存