From de9dfc294b792d114d16a0a572ddcc6b69f2017b Mon Sep 17 00:00:00 2001 From: Tyler Yep Date: Fri, 21 May 2021 22:40:18 -0700 Subject: [PATCH] Use Github Actions, remove travis.yml --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ codecov.yml => .github/codecov.yml | 0 .github/workflows/test.yml | 34 ++++++++++++++++++++ .travis.yml | 13 -------- README.md | 6 ++-- 6 files changed, 95 insertions(+), 16 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md rename codecov.yml => .github/codecov.yml (100%) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/codecov.yml b/.github/codecov.yml similarity index 100% rename from codecov.yml rename to .github/codecov.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8ae6ecd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: Python package +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.7, 3.8, 3.9, 3.10-dev] + + 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 + python -m pip install mypy pytest pytest-cov + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: mypy + run: | + mypy . + - name: pytest + run: | + pytest --cov=stanfordkarel --cov-report= --durations=0 + - name: codecov + uses: codecov/codecov-action@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cb5deb5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10-dev" -install: - - pip install --upgrade pytest - - pip install pytest-cov codecov -script: - - pytest --cov=stanfordkarel --cov-report= --durations=0 -after_success: - - codecov diff --git a/README.md b/README.md index f6c4283..e12cda1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # stanford-karel [![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/release/python-370/) -[![Build Status](https://travis-ci.com/TylerYep/stanfordkarel.svg?branch=master)](https://travis-ci.com/TylerYep/stanfordkarel) +[![Build Status](https://github.com/TylerYep/stanfordkarel/actions/workflows/test.yml/badge.svg)](https://github.com/TylerYep/stanfordkarel/actions/workflows/test.yml) [![PyPI version](https://badge.fury.io/py/stanfordkarel.svg)](https://badge.fury.io/py/stanfordkarel) -[![GitHub license](https://img.shields.io/github/license/TylerYep/stanfordkarel)](https://github.com/TylerYep/stanfordkarel/blob/master/LICENSE) +[![GitHub license](https://img.shields.io/github/license/TylerYep/stanfordkarel)](https://github.com/TylerYep/stanfordkarel/blob/main/LICENSE) [![Downloads](https://pepy.tech/badge/stanfordkarel)](https://pepy.tech/project/stanfordkarel) This is a Python implementation of Karel for Stanford's CS 106A. This package is available on PyPI and allows you to run Karel programs without any additional setup! @@ -138,4 +138,4 @@ In the future, I hope to add: - Ways of determining the student's strategy or approach from observing Karel movements - Autograde more worlds, broken down by assignment - Allow students to autograde their own work -- Accessibility for visually-impaired students (using ascii karel) +- Accessibility for visually-impaired students