From 30378d60cf2409f579957b25e737558750a73864 Mon Sep 17 00:00:00 2001 From: lhenry15 Date: Fri, 17 Dec 2021 10:47:37 -0600 Subject: [PATCH] add action Build --- .github/workflows/unit_test.yml | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 4 +++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/unit_test.yml diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml new file mode 100644 index 0000000..74736a9 --- /dev/null +++ b/.github/workflows/unit_test.yml @@ -0,0 +1,38 @@ +name: Build + +on: + - push + # branches: [main, development] + - pull_request + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + # os: [ubuntu-latest, macOS-latest] + os: [macOS-latest] + #python-version: ['3.6'] + python-version: ['3.7', '3.8'] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + pip install -e . + - name: coverall + run: | + pip install coveralls + pip install pytest-cover + - name: run pytest + run: | + py.test tods/tests/ --cov=tods + coveralls + - name: codecov + uses: codecov/codecov-action@v1 diff --git a/README.md b/README.md index 7698923..7fd1f17 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ Logo -[![Build Status](https://travis-ci.org/datamllab/tods.svg?branch=master)](https://travis-ci.org/datamllab/tods) +[![Actions Status](https://github.com/datamllab/tods/workflows/Build/badge.svg)](https://github.com/datamllab/tods/actions) + +[![codecov](https://codecov.io/gh/datamllab/tods/branch/dev/graph/badge.svg?token=M90ZCVTRBF)](https://codecov.io/gh/datamllab/tods) [中文文档](README.zh-CN.md)