diff --git a/.github/workflows/ets-from-source.yml b/.github/workflows/ets-from-source.yml new file mode 100644 index 000000000..3823a20b8 --- /dev/null +++ b/.github/workflows/ets-from-source.yml @@ -0,0 +1,43 @@ +name: Test with EDM using ETS packages from source + +on: + schedule: + - cron: '0 0 * * 5' + + +env: + INSTALL_EDM_VERSION: 3.2.3 + +jobs: + + # Test against EDM packages + test-with-edm: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + env: + # Set root directory, mainly for Windows, so that the EDM Python + # environment lives in the same drive as the cloned source. Otherwise + # 'pip install' raises an error while trying to compute + # relative path between the site-packages and the source directory. + EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm + steps: + - uses: actions/checkout@v2 + - name: Cache EDM packages + uses: actions/cache@v2 + with: + path: ~/.cache + key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('etstool.py') }} + - name: Setup EDM + uses: enthought/setup-edm-action@v1 + with: + edm-version: ${{ env.INSTALL_EDM_VERSION }} + - name: Install click to the default EDM environment + run: edm install -y wheel click coverage + - name: Install test environment + run: edm run -- python etstool.py install --source + - name: Run tests + uses: GabrielBB/xvfb-action@v1 + with: + run: edm run -- python etstool.py test diff --git a/.github/workflows/test-with-edm.yml b/.github/workflows/test-with-edm.yml new file mode 100644 index 000000000..b1eb59b75 --- /dev/null +++ b/.github/workflows/test-with-edm.yml @@ -0,0 +1,47 @@ +# This workflow targets stable released dependencies from EDM. +# Note that some packages may not actually be installed from EDM but from +# PyPI, see etstool.py implementations. + +name: Test with EDM + +on: pull_request + +env: + INSTALL_EDM_VERSION: 3.2.3 + +jobs: + + # Test against EDM packages + test-with-edm: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + env: + # Set root directory, mainly for Windows, so that the EDM Python + # environment lives in the same drive as the cloned source. Otherwise + # 'pip install' raises an error while trying to compute + # relative path between the site-packages and the source directory. + EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm + steps: + - uses: actions/checkout@v2 + - name: Cache EDM packages + uses: actions/cache@v2 + with: + path: ~/.cache + key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('etstool.py') }} + - name: Setup EDM + uses: enthought/setup-edm-action@v1 + with: + edm-version: ${{ env.INSTALL_EDM_VERSION }} + - name: Install click to the default EDM environment + run: edm install -y wheel click coverage + - name: Install test environment + run: edm run -- python etstool.py install + - name: Flake8 + run: edm run -- python etstool.py flake8 + if: startsWith(matrix.os, 'ubuntu') + - name: Run tests + uses: GabrielBB/xvfb-action@v1 + with: + run: edm run -- python etstool.py test