From ee147fc1787d5c45fc545c723809c12554404005 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sat, 5 Jun 2021 00:46:55 +0200 Subject: [PATCH] Initial github actions-based continous build MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Preparing to migrate from Travis… --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c8591a8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +on: [push] +name: Continuous Integration +jobs: + build: + name: Build and test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python-version: ['3.5', '3.6', '3.7', '3.8', '3.9'] + include: + - os: ubuntu-18.04 + python-version: '3.4' + installTyping: ${{ true }} + fail-fast: false + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache pip + uses: actions/cache@v2 + with: + # This path is specific to Ubuntu + path: ~/.cache/pip + # Look to see if there is a cache hit for the corresponding requirements file + key: v1-pip-${{ runner.os }}-${{ matrix.python-version }} + restore-keys: | + v1-pip-${{ runner.os }} + v1-pip- + + - name: Install dependencies + run: | + gem install --user-install coveralls-lcov + pip install pytest + pip install codecov + + - name: Install typing for old Python + run: pip install typing + if: matrix.installTyping + + - name: Build the code + run: python ./setup.py build_ext -i + + - name: Run tests + run: python -m pytest tests -- 2.39.5