Skip to content

Commit

Permalink
updated github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreFCruz committed Jun 6, 2024
1 parent 6619210 commit db19c9e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 65 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/python-tests-with-tox.yml

This file was deleted.

43 changes: 14 additions & 29 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Tests
name: Tests with tox

on:
push:
paths-ignore:
- 'examples/**'
- 'docs/**'
- 'README.md'
- 'LICENSE'
- '.gitignore'

paths:
- "folktexts/**"
- "tests/**"
- "requirements/**"
- "pyproject.toml"
pull_request:
branches:
- main
paths:
- "folktexts/**"
- "tests/**"
- "requirements/**"
- "pyproject.toml"

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[tests]"
# ^ install local package with extra test dependencies
- name: Lint with flake8
continue-on-error: true
run: |
flake8 folktexts tests --count --statistics
- name: Test with pytest
run: |
coverage run -m pytest tests && coverage report -m
# TODO: $ coverage run -m pytest tests && coverage report -m --fail-under=75
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ build-backend = "setuptools.build_meta"
[project]
name = "folktexts"
description = "A benchmark on LLM calibration to human populations."
license = {file = "LICENSE"}
license = "MIT"
# license = {file = "LICENSE"}
authors = [
{ name = "Andre Cruz" },
{ name = "Ricardo Dominguez-Olmedo" },
Expand Down

0 comments on commit db19c9e

Please sign in to comment.