diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 8bc177f..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: CI - -on: - pull_request: - push: - branches: - - master - -jobs: - test: - - runs-on: ubuntu-18.04 - - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v1 - with: - python-version: "3.7" - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Install dev dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r dev-requirements.txt - - name: "Run tests" - run: python -m pytest --cov --cov-config=.coveragerc tests/ - env: - PYTHONDEVMODE: 1 - - run: python -m coverage html - - uses: actions/upload-artifact@v1 - with: - name: "HTML coverage report" - path: htmlcov - - - lint: - - runs-on: ubuntu-18.04 - - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v1 - with: - python-version: "3.7" - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Install tools - run: | - python -m pip install --upgrade pip - python -m pip install -r dev-requirements.txt - - run: mypy --config-file=mypy.ini __app__ - - run: black --check . - - - deploy: - - if: github.event_name == 'push' && github.repository == 'microsoft/pvscbot' && github.ref == 'refs/heads/master' - needs: [test, lint] - runs-on: ubuntu-18.04 - env: - APP_LOCATION: __app__ - PYTHON_VERSION: "3.7" - - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v1 - with: - python-version: ${{ env.PYTHON_VERSION }} - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: 'Run pip' - shell: bash - run: | - # If your function app project is not located in your repository's root - # Please change your directory for pip in pushd - pushd ${{ env.APP_LOCATION }} - python -m pip install --upgrade pip - pip install -r requirements.txt --target=".python_packages/lib/site-packages" - popd - - uses: Azure/functions-action@v1 - with: - app-name: pvscbot-functions - package: ${{ env.APP_LOCATION }} - publish-profile: ${{ secrets.SCM_CREDENTIALS }}