diff --git a/.github/workflows/install-pkg.yml b/.github/workflows/install-pkg.yml new file mode 100644 index 0000000000000000000000000000000000000000..00a83cefffe7ed01681b52419ac8351be401ef86 --- /dev/null +++ b/.github/workflows/install-pkg.yml @@ -0,0 +1,68 @@ +name: Install pkg + +# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows +on: + # Trigger the workflow on push or pull request, + # but only for the master branch + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + pkg-check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Check package + run: | + pip install check-manifest + check-manifest + python setup.py check --metadata --strict + + - name: Create package + run: | + pip install --upgrade setuptools wheel + python setup.py sdist + + - name: Verify package + run: | + pip install twine==1.13.0 + twine check dist/* + python setup.py clean + + pkg-install: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, macOS-10.15] # , windows-2019 + python-version: [3.7, 3.8] + + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Create package + run: | + python setup.py sdist + + - name: Install package + run: | + pip install virtualenv + virtualenv vEnv + source vEnv/bin/activate + pip install dist/* + cd .. & python -c "import pytorch_lightning as pl ; print(pl.__version__)" + cd .. & python -c "import research_mnist ; print(research_mnist.__version__)" + deactivate + rm -rf vEnv