From 385bb0915fd5a73c6fd8434392ad2b244b088f9d Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Fri, 23 Sep 2022 11:14:51 -0700 Subject: [PATCH] Temporarily remove workflows --- .github/workflows/installer-macos.yml | 127 ----------------------- .github/workflows/installer-win.yml | 77 -------------- .github/workflows/test-files.yml | 127 ----------------------- .github/workflows/test-linux.yml | 144 -------------------------- .github/workflows/test-mac.yml | 129 ----------------------- .github/workflows/test-win.yml | 125 ---------------------- 6 files changed, 729 deletions(-) delete mode 100644 .github/workflows/installer-macos.yml delete mode 100644 .github/workflows/installer-win.yml delete mode 100644 .github/workflows/test-files.yml delete mode 100644 .github/workflows/test-linux.yml delete mode 100644 .github/workflows/test-mac.yml delete mode 100644 .github/workflows/test-win.yml diff --git a/.github/workflows/installer-macos.yml b/.github/workflows/installer-macos.yml deleted file mode 100644 index f30a4267b1e..00000000000 --- a/.github/workflows/installer-macos.yml +++ /dev/null @@ -1,127 +0,0 @@ -on: - pull_request: - paths: - - 'installers/macOS/**' - - '.github/workflows/installer-macos.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!**.md' - - '!installers/Windows/**' - - '!installers-conda/**' - - '!.github/workflows/installer-win.yml' - - '!.github/workflows/installers-conda.yml' - - release: - types: - - created - -name: Create macOS App Bundle and DMG - -jobs: - matrix_prep: - name: Determine Build Matrix - runs-on: macos-11 - outputs: - build_type: ${{ steps.set-matrix.outputs.build_type }} - steps: - - id: set-matrix - run: | - if [[ ${GITHUB_EVENT_NAME} == 'release' ]]; then - build_type=$(echo "['Full', 'Lite']") - else - build_type=$(echo "['Full']") - fi - echo "::set-output name=build_type::{'build_type':$(echo $build_type)}" - build: - name: macOS App Bundle - runs-on: macos-11 - needs: matrix_prep - strategy: - matrix: ${{fromJson(needs.matrix_prep.outputs.build_type)}} - defaults: - run: - shell: bash -l {0} - working-directory: ${{ github.workspace }}/installers/macOS - env: - LITE_FLAG: ${{ matrix.build_type == 'Lite' && '--lite' || '' }} - DMGNAME: ${{ matrix.build_type == 'Lite' && 'Spyder-Lite.dmg' || 'Spyder.dmg' }} - DISTDIR: ${{ github.workspace }}/dist - MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} - MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} - APPLICATION_PWD: ${{ secrets.APPLICATION_PWD }} - steps: - - name: Checkout Code - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.9.14' - architecture: 'x64' - - name: Install Dependencies - run: | - INSTALL_FLAGS=() - if [[ -z ${LITE_FLAG} ]]; then - INSTALL_FLAGS+=('-r' 'req-scientific.txt') - fi - ${pythonLocation}/bin/python -m pip install -U pip setuptools - ${pythonLocation}/bin/python -m pip install -r req-build.txt -r req-extras.txt -r req-plugins.txt "${INSTALL_FLAGS[@]}" -e ${GITHUB_WORKSPACE} - - name: Install Subrepos - if: ${{github.event_name == 'pull_request'}} - run: ${pythonLocation}/bin/python -bb -X dev -W error ${GITHUB_WORKSPACE}/install_dev_repos.py --not-editable --no-install spyder - - name: Show Build Environment - run: | - ${pythonLocation}/bin/python -V -V - ${pythonLocation}/bin/python -m pip list - - name: Install Micromamba - working-directory: ${{ github.workspace }}/spyder - run: | - curl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj bin/micromamba - install_name_tool -change @rpath/libc++.1.dylib /usr/lib/libc++.1.dylib bin/micromamba - - name: Build Application Bundle - run: ${pythonLocation}/bin/python setup.py ${LITE_FLAG} --dist-dir ${DISTDIR} - - name: Create Keychain - if: ${{github.event_name == 'release'}} - run: ./certkeychain.sh "${MACOS_CERTIFICATE}" "${MACOS_CERTIFICATE_PWD}" - - name: Code Sign Application - if: ${{github.event_name == 'release'}} - run: | - pil=$(${pythonLocation} -c "import PIL, os; print(os.path.dirname(PIL.__file__))") - rm -v ${DISTDIR}/Spyder.app/Contents/Frameworks/liblzma.5.dylib - cp -v ${pil}/.dylibs/liblzma.5.dylib ${DISTDIR}/Spyder.app/Contents/Frameworks/ - ./codesign.sh "${DISTDIR}/Spyder.app" - - name: Test Application Bundle - run: ./test_app.sh -t 60 -d 10 ${DISTDIR} - - name: Build Disk Image - run: ${pythonLocation}/bin/python setup.py ${LITE_FLAG} --dist-dir ${DISTDIR} --dmg --no-app - - name: Sign Disk Image - if: ${{github.event_name == 'release'}} - run: ./codesign.sh "${DISTDIR}/${DMGNAME}" - - name: Notarize Disk Image - if: ${{github.event_name == 'release'}} - run: ./notarize.sh -i 30 -p "${APPLICATION_PWD}" "${DISTDIR}/${DMGNAME}" - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - path: ${{ env.DISTDIR }}/${{ env.DMGNAME }} - name: ${{ env.DMGNAME }} - - name: Get Release - if: ${{github.event_name == 'release'}} - id: get_release - env: - GITHUB_TOKEN: ${{ github.token }} - uses: bruceadams/get-release@v1.2.0 - - name: Upload Release Asset - if: ${{github.event_name == 'release'}} - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: ${{ env.DISTDIR }}/${{ env.DMGNAME }} - asset_name: ${{ env.DMGNAME }} - asset_content_type: application/x-apple-diskimage diff --git a/.github/workflows/installer-win.yml b/.github/workflows/installer-win.yml deleted file mode 100644 index fc622d05c94..00000000000 --- a/.github/workflows/installer-win.yml +++ /dev/null @@ -1,77 +0,0 @@ -# Based on https://github.com/tlambert03/napari/blob/master/.github/workflows/make_bundle.yml -on: - pull_request: - paths: - - 'installers/Windows/**' - - '.github/workflows/installer-win.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!**.md' - - '!installers/macOS/**' - - '!installers-conda/**' - - '!.github/workflows/installer-macos.yml' - - '!.github/workflows/installers-conda.yml' - - release: - types: - - created - -name: Create Windows Installer - -jobs: - build: - name: Windows installer - runs-on: windows-latest - strategy: - matrix: - build_type: ['Lite', 'Full'] - env: - UNWANTED_PACKAGES: ${{github.event_name == 'pull_request' && 'pip spyder-kernels python-slugify Rtree QDarkStyle PyNaCl' || 'pip python-slugify Rtree PyNaCl' }} - SKIP_PACKAGES: 'bcrypt slugify' - ADD_PACKAGES: ${{github.event_name == 'pull_request' && 'spyder_kernels blib2to3 _black_version blackd rtree qdarkstyle nacl' || 'blib2to3 _black_version blackd rtree nacl' }} - PYNSIST_REQ: pynsist==2.7 - EXTRA_FLAG: ${{ matrix.build_type == 'Full' && github.event_name == 'pull_request' && '-ep installers/Windows/req-extras-pull-request.txt' || matrix.build_type == 'Lite' && github.event_name == 'pull_request' && '-ep installers/Windows/req-pull-request.txt' || matrix.build_type == 'Full' && '-ep installers/Windows/req-extras-release.txt' || '-ep installers/Windows/req-release.txt' }} - SUFFIX_FLAG: ${{ matrix.build_type == 'Lite' && '-s lite' || '-s full' }} - TEMPLATE_FAG: '-t installers/Windows/assets/nsist/spyder.nsi' - EXE_NAME: ${{ matrix.build_type == 'Lite' && github.event_name == 'pull_request' && 'Spyder_64bit_lite.exe' || matrix.build_type == 'Lite' && 'Spyder_64bit_lite.exe' || 'Spyder_64bit_full.exe' }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Install Python - uses: actions/setup-python@v2 - with: - python-version: 3.8.10 - - name: Install yarg - shell: bash -l {0} - run: | - python -m pip install yarg - - name: Run script - shell: bash -l {0} - run: | - python installers/Windows/installer.py 3.8.10 64 setup.py spyder.app.start:main spyder img_src/spyder.ico LICENSE.txt ${EXTRA_FLAG} ${SUFFIX_FLAG} ${TEMPLATE_FAG} - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - path: dist/${{ env.EXE_NAME }} - name: ${{ env.EXE_NAME }} - - name: Get Release - if: ${{github.event_name == 'release'}} - id: get_release - env: - GITHUB_TOKEN: ${{ github.token }} - uses: bruceadams/get-release@v1.2.0 - - name: Upload Release Asset - if: ${{github.event_name == 'release'}} - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: dist/${{ env.EXE_NAME }} - asset_name: ${{ env.EXE_NAME }} - asset_content_type: application/vnd.microsoft.portable-executable diff --git a/.github/workflows/test-files.yml b/.github/workflows/test-files.yml deleted file mode 100644 index 25b3fc6d267..00000000000 --- a/.github/workflows/test-files.yml +++ /dev/null @@ -1,127 +0,0 @@ -name: File tests - -on: - push: - branches: - - master - - 5.* - - 4.x - paths: - - '.github/scripts/*.sh' - - '.github/workflows/*.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!installers*/**' - - '!.github/workflows/installer*.yml' - - pull_request: - branches: - - master - - 5.* - - 4.x - paths: - - '.github/scripts/*.sh' - - '.github/workflows/*.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!installers*/**' - - '!.github/workflows/installer*.yml' - -jobs: - build: - name: Linux - Py${{ matrix.PYTHON_VERSION }} - runs-on: ubuntu-latest - env: - CI: 'true' - USE_CONDA: 'true' - OS: 'linux' - PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} - strategy: - fail-fast: false - matrix: - PYTHON_VERSION: ['3.7', '3.9'] - timeout-minutes: 30 - steps: - - name: Checkout Pull Requests - if: github.event_name == 'pull_request' - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Checkout Push - if: github.event_name != 'pull_request' - uses: actions/checkout@v2 - - name: Fetch branches - if: github.event_name == 'pull_request' - run: git fetch --prune --unshallow - - name: Check build skips - if: github.event_name == 'pull_request' - shell: bash -l {0} - run: source .github/scripts/check_skip.sh - - name: Check build runs - if: github.event_name != 'pull_request' - shell: bash -l {0} - run: echo "RUN_BUILD=true" >> $GITHUB_ENV - - name: Install dependencies - if: env.RUN_BUILD == 'true' - shell: bash - run: | - sudo apt-get update --fix-missing - sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing - - name: Cache conda - uses: actions/cache@v2 - env: - # Increase this value to reset cache if requirements/*.txt has not changed - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-cacheconda-installconda-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.txt') }} - - name: Cache pip - if: env.RUN_BUILD == 'true' - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-cachepip-installconda-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }} - - name: Install Conda - if: env.RUN_BUILD == 'true' - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - auto-update-conda: false - auto-activate-base: false - python-version: ${{ matrix.PYTHON_VERSION }} - use-only-tar-bz2: true - channels: conda-forge,defaults - channel-priority: strict - miniforge-variant: Mambaforge - - name: Create test environment - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: bash -l .github/scripts/install.sh - - name: Use QtAwesome 1.0.1 - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: pip install --no-deps qtawesome==1.0.1 - - name: Install QDarkStyle from master - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: pip install --no-deps git+https://github.com/ColinDuquesnoy/QDarkStyleSheet.git@develop - - name: Show test environment - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: | - conda info - conda list - - name: Run file tests - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: xvfb-run --auto-servernum .github/scripts/modules_test.sh || xvfb-run --auto-servernum .github/scripts/modules_test.sh - # Uncomment this to debug the CI job - # - name: Setup tmate session - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml deleted file mode 100644 index 8eea69643f3..00000000000 --- a/.github/workflows/test-linux.yml +++ /dev/null @@ -1,144 +0,0 @@ -name: Linux tests - -on: - push: - branches: - - master - - 5.* - - 4.x - paths: - - '.github/scripts/*.sh' - - '.github/workflows/*.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!installers*/**' - - '!.github/workflows/installer*.yml' - - pull_request: - branches: - - master - - 5.* - - 4.x - paths: - - '.github/scripts/*.sh' - - '.github/workflows/*.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!installers*/**' - - '!.github/workflows/installer*.yml' - -jobs: - build: - name: Linux - Py${{ matrix.PYTHON_VERSION }}, ${{ matrix.INSTALL_TYPE }}, ${{ matrix.TEST_TYPE }} - runs-on: ubuntu-latest - env: - CI: 'true' - CODECOV_TOKEN: "56731c25-9b1f-4340-8b58-35739bfbc52d" - OS: 'linux' - PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} - RUN_SLOW: ${{ matrix.TEST_TYPE == 'slow' }} - USE_CONDA: ${{ matrix.INSTALL_TYPE == 'conda' }} - USE_GDB: 'false' - strategy: - fail-fast: false - matrix: - INSTALL_TYPE: ['pip', 'conda'] - PYTHON_VERSION: ['3.7', '3.9'] - TEST_TYPE: ['fast', 'slow'] - timeout-minutes: 120 - steps: - - name: Checkout Pull Requests - if: github.event_name == 'pull_request' - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Checkout Push - if: github.event_name != 'pull_request' - uses: actions/checkout@v2 - - name: Fetch branches - run: git fetch --prune --unshallow - - name: Check build skips - if: github.event_name == 'pull_request' - shell: bash -l {0} - run: source .github/scripts/check_skip.sh - - name: Check build runs - if: github.event_name != 'pull_request' - shell: bash -l {0} - run: echo "RUN_BUILD=true" >> $GITHUB_ENV - - name: Install dependencies - if: env.RUN_BUILD == 'true' - shell: bash - run: | - sudo apt-get update --fix-missing - sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing - - name: Cache conda - uses: actions/cache@v2 - env: - # Increase this value to reset cache if requirements/*.txt has not changed - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-cacheconda-install${{ matrix.INSTALL_TYPE }}-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.txt') }} - - name: Cache pip - if: env.RUN_BUILD == 'true' - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-cachepip-install${{ matrix.INSTALL_TYPE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }} - - name: Install Conda - if: env.RUN_BUILD == 'true' - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - auto-update-conda: false - auto-activate-base: false - python-version: ${{ matrix.PYTHON_VERSION }} - use-only-tar-bz2: true - channels: conda-forge,defaults - channel-priority: strict - miniforge-variant: Mambaforge - - name: Create test environment - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: bash -l .github/scripts/install.sh - - name: Show test environment - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: | - conda info - conda list - #- name: Setup tmate session - # if: env.RUN_BUILD == 'true' - # uses: mxschmitt/action-tmate@v3 - # timeout-minutes: 30 - - name: Run manifest checks - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: check-manifest - - name: Run tests with gdb - if: env.USE_GDB == 'true' - shell: bash -l {0} - run: xvfb-run --auto-servernum gdb -return-child-result -batch -ex r -ex py-bt --args python runtests.py -s - - name: Run tests - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: | - rm -f pytest_log.txt # Must remove any log file from a previous run - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh - - name: Coverage - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: codecov - # Enable this if SSH debugging is required - # - name: Setup tmate session - # uses: andfoy/action-tmate@69bac54a5cc0abe008e87d7470fbf65733745aea - # if: ${{ failure() }} diff --git a/.github/workflows/test-mac.yml b/.github/workflows/test-mac.yml deleted file mode 100644 index c547934cb14..00000000000 --- a/.github/workflows/test-mac.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: Mac tests - -on: - push: - branches: - - master - - 5.* - - 4.x - paths: - - '.github/scripts/*.sh' - - '.github/workflows/*.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!installers*/**' - - '!.github/workflows/installer*.yml' - - pull_request: - branches: - - master - - 5.* - - 4.x - paths: - - '.github/scripts/*.sh' - - '.github/workflows/*.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!installers*/**' - - '!.github/workflows/installer*.yml' - -jobs: - build: - name: Mac - Py${{ matrix.PYTHON_VERSION }}, ${{ matrix.INSTALL_TYPE }}, ${{ matrix.TEST_TYPE }} - runs-on: macos-12 - env: - CI: 'true' - CODECOV_TOKEN: "56731c25-9b1f-4340-8b58-35739bfbc52d" - OS: 'macos' - PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} - RUN_SLOW: ${{ matrix.TEST_TYPE == 'slow' }} - USE_CONDA: ${{ matrix.INSTALL_TYPE == 'conda' }} - strategy: - fail-fast: false - matrix: - INSTALL_TYPE: ['conda'] - PYTHON_VERSION: ['3.9'] - TEST_TYPE: ['fast', 'slow'] - timeout-minutes: 120 - steps: - - name: Checkout Pull Requests - if: github.event_name == 'pull_request' - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Checkout Push - if: github.event_name != 'pull_request' - uses: actions/checkout@v2 - - name: Fetch branches - run: git fetch --prune --unshallow - - name: Check build skips - if: github.event_name == 'pull_request' - shell: bash -l {0} - run: source .github/scripts/check_skip.sh - - name: Check build runs - if: github.event_name != 'pull_request' - shell: bash -l {0} - run: echo "RUN_BUILD=true" >> $GITHUB_ENV - - name: Cache conda - uses: actions/cache@v2 - env: - # Increase this value to reset cache if requirements/*.txt has not changed - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-cacheconda-install${{ matrix.INSTALL_TYPE }}-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.txt') }} - - name: Cache pip - if: env.RUN_BUILD == 'true' - uses: actions/cache@v2 - with: - path: ~/Library/Caches/pip - key: ${{ runner.os }}-cachepip-install${{ matrix.INSTALL_TYPE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }} - - name: Install Conda - if: env.RUN_BUILD == 'true' - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - auto-update-conda: false - auto-activate-base: false - python-version: ${{ matrix.PYTHON_VERSION }} - use-only-tar-bz2: true - channels: conda-forge,defaults - channel-priority: strict - miniforge-variant: Mambaforge - - name: Create test environment - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: bash -l .github/scripts/install.sh - - name: Show test environment - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: | - conda info - conda list - - name: Run manifest checks - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: check-manifest - - name: Run tests - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: | - rm -f pytest_log.txt # Must remove any log file from a previous run - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh - # Enable this if SSH debugging is required - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - # if: ${{ failure() }} - - name: Coverage - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: codecov diff --git a/.github/workflows/test-win.yml b/.github/workflows/test-win.yml deleted file mode 100644 index 80f47cad82e..00000000000 --- a/.github/workflows/test-win.yml +++ /dev/null @@ -1,125 +0,0 @@ -name: Win tests - -on: - push: - branches: - - master - - 5.* - - 4.x - paths: - - '.github/scripts/*.sh' - - '.github/workflows/*.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!installers*/**' - - '!.github/workflows/installer*.yml' - - pull_request: - branches: - - master - - 5.* - - 4.x - paths: - - '.github/scripts/*.sh' - - '.github/workflows/*.yml' - - 'requirements/*.yml' - - 'MANIFEST.in' - - '**.bat' - - '**.py' - - '**.sh' - - '!installers*/**' - - '!.github/workflows/installer*.yml' - -jobs: - build: - name: Windows - Py${{ matrix.PYTHON_VERSION }}, ${{ matrix.INSTALL_TYPE }}, ${{ matrix.TEST_TYPE }} - runs-on: windows-latest - env: - CI: 'true' - CODECOV_TOKEN: "56731c25-9b1f-4340-8b58-35739bfbc52d" - OS: 'win' - PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} - RUN_SLOW: ${{ matrix.TEST_TYPE == 'slow' }} - USE_CONDA: ${{ matrix.INSTALL_TYPE == 'conda' }} - strategy: - fail-fast: false - matrix: - INSTALL_TYPE: ['pip', 'conda'] - PYTHON_VERSION: ['3.9'] - TEST_TYPE: ['fast', 'slow'] - timeout-minutes: 120 - steps: - - name: Checkout Pull Requests - if: github.event_name == 'pull_request' - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Checkout Push - if: github.event_name != 'pull_request' - uses: actions/checkout@v2 - - name: Fetch branches - run: git fetch --prune --unshallow - - name: Check build skips - if: github.event_name == 'pull_request' - shell: bash -l {0} - run: source .github/scripts/check_skip.sh - - name: Check build runs - if: github.event_name != 'pull_request' - shell: bash -l {0} - run: echo "RUN_BUILD=true" >> $GITHUB_ENV - - name: Cache conda - uses: actions/cache@v2 - env: - # Increase this value to reset cache if requirements/*.txt has not changed - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-cacheconda-install${{ matrix.INSTALL_TYPE }}-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.txt') }} - - name: Cache pip - if: env.RUN_BUILD == 'true' - uses: actions/cache@v2 - with: - path: ~\AppData\Local\pip\Cache - key: ${{ runner.os }}-cachepip-install${{ matrix.INSTALL_TYPE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }} - - name: Install Conda - if: env.RUN_BUILD == 'true' - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - auto-update-conda: false - auto-activate-base: false - python-version: ${{ matrix.PYTHON_VERSION }} - use-only-tar-bz2: true - channels: conda-forge,defaults - channel-priority: strict - miniforge-variant: Mambaforge - - name: Create test environment - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: bash -l .github/scripts/install.sh - - name: Show test environment - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: | - conda info - conda list - - name: Run manifest checks - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: check-manifest - - name: Run tests - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: | - rm -f pytest_log.txt # Must remove any log file from a previous run - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh || \ - bash -l .github/scripts/run_tests.sh - - name: Coverage - if: env.RUN_BUILD == 'true' - shell: bash -l {0} - run: codecov