Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub action to test package generation #6

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Unit Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test Cookiecutter Package
runs-on: ubuntu-20.04
timeout-minutes: 5
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Check out code
uses: actions/checkout@v4
- name: Install Cookiecutter
run: pip install cookiecutter
- name: Generate project
run: cookiecutter --no-input .
- name: Install new project
run: pip install ./custom_codemod
- name: Run codemodder
run: codemodder --list
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,4 @@ dmypy.json
*.codetf*
*.sarif

# version
src/custom_codemods/_version.py
custom_codemod