Skip to content

Commit

Permalink
Add test CI (#14)
Browse files Browse the repository at this point in the history
* Add test CI

* rename step

* single quote

* dot separator

* install python deps

* add shell spec
  • Loading branch information
aoirint authored May 24, 2024
1 parent 04f6524 commit add0bbf
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test

on:
push:
pull_request:
workflow_dispatch:

jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- python_version: "3.8"
- python_version: "3.9"
- python_version: "3.10"
- python_version: "3.11"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python_version }}"
cache: "pip"
cache-dependency-path: '**/requirements.test.txt'

- name: Install Python dependencies
shell: bash
run: pip install -r requirements.test.txt

- name: Cache Test data
id: cache-testdata
uses: actions/cache@v4
with:
path: testdata/
key: ${{ runner.os }}-testdata-v1

- name: Download Test data
if: steps.cache-testdata.outputs.cache-hit != 'true'
shell: bash
run: ./get_testdata.sh

- name: Run test
shell: bash
run: pytest ./tests

0 comments on commit add0bbf

Please sign in to comment.