Skip to content

Commit

Permalink
Merge CI and add release (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinchuby authored Nov 13, 2022
1 parent 2524f42 commit 10f726f
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 896 deletions.
48 changes: 47 additions & 1 deletion .github/workflows/lint.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Lint
name: CI

on:
push:
branches:
- main
tags:
- v*
pull_request:

jobs:
Expand Down Expand Up @@ -50,3 +52,47 @@ jobs:
sarif_file: lintrunner.sarif
category: lintrunner
checkout_path: ${{ github.workspace }}
test:
name: pytest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install dependencies
run: |
pipx install poetry
poetry install
poetry run lintrunner init
- name: Run pytest
run: |
PY_IGNORE_IMPORTMISMATCH=1 poetry run pytest --doctest-modules
- name: Build package with poetry
run: |
poetry build
- name: Upload wheels
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
name: wheels
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [lint, test]
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
password: ${{ secrets.PYPI_API_TOKEN }}
26 changes: 0 additions & 26 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

Expand Down
108 changes: 0 additions & 108 deletions examples/pytorch/nativefunctions_linter.py

This file was deleted.

Loading

0 comments on commit 10f726f

Please sign in to comment.