init #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.6", "3.7"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pytest pytest-cov codecov | |
python -m pip install torch | |
python -m pip install torchvision | |
python -m pip install tensorflow==1.14.0 | |
python -m pip install scipy | |
python -m pip install foolbox==1.3.2 | |
python -m pip install Keras==2.2.2 | |
python -m pip install git+https://github.com/tensorflow/cleverhans.git@336b9f4ed95dccc7f0d12d338c2038c53786ab70 | |
- name: Install package | |
run: | | |
python -m pip install -e . | |
- name: Lint with flake8 | |
run: | | |
flake8 . --exclude=build/* | |
- name: Test with pytest | |
run: | | |
pytest | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
files: ./cov.xml |