Skip to content

Commit

Permalink
Add GHA CI tests (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianeboyd authored Mar 14, 2023
1 parent 1361747 commit f7ab5fe
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: tests

on:
push:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
tests:
name: Test
runs-on: macos-latest

steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Configure Python version
uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: x64

- name: Build sdist
run: |
python -m pip install -U build pip setuptools
python -m pip install -U -r requirements.txt
python -m build --sdist
- name: Delete source directory
run: rm -rf spacy_stanza
shell: bash

- name: Uninstall all packages
run: |
python -m pip freeze > installed.txt
python -m pip uninstall -y -r installed.txt
- name: Install from sdist
run: |
SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1)
python -m pip install dist/$SDIST
shell: bash

- name: Test import
run: python -c "import spacy_stanza"

- name: Install test requirements
run: python -m pip install -U -r requirements.txt

- name: Run tests
run: python -m pytest tests

0 comments on commit f7ab5fe

Please sign in to comment.