From e6300b6c4d0e428569af36e2561e9fce3174c666 Mon Sep 17 00:00:00 2001 From: Aaron Ayres Date: Mon, 14 Jun 2021 13:46:18 -0500 Subject: [PATCH 1/2] port CI to gh-actions --- .github/workflows/ets-from-source.yml | 47 +++++++++++++++++++++++++++ .github/workflows/test-with-edm.yml | 47 +++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 .github/workflows/ets-from-source.yml create mode 100644 .github/workflows/test-with-edm.yml diff --git a/.github/workflows/ets-from-source.yml b/.github/workflows/ets-from-source.yml new file mode 100644 index 000000000..560e350a9 --- /dev/null +++ b/.github/workflows/ets-from-source.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 using ETS packages from source + +on: + schedule: + - cron: '0 0 * * 5' + + +env: + INSTALL_EDM_VERSION: 3.2.3 + +jobs: + + # Test against EDM packages on Windows and OSX + 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..b48e6f1d4 --- /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 on Windows and OSX + 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 From e5dbbe739990e1c4f06164b4bc10df7c83d1254e Mon Sep 17 00:00:00 2001 From: Aaron Ayres Date: Mon, 14 Jun 2021 15:09:25 -0500 Subject: [PATCH 2/2] remove incorrect comments --- .github/workflows/ets-from-source.yml | 6 +----- .github/workflows/test-with-edm.yml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ets-from-source.yml b/.github/workflows/ets-from-source.yml index 560e350a9..3823a20b8 100644 --- a/.github/workflows/ets-from-source.yml +++ b/.github/workflows/ets-from-source.yml @@ -1,7 +1,3 @@ -# 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 using ETS packages from source on: @@ -14,7 +10,7 @@ env: jobs: - # Test against EDM packages on Windows and OSX + # Test against EDM packages test-with-edm: strategy: matrix: diff --git a/.github/workflows/test-with-edm.yml b/.github/workflows/test-with-edm.yml index b48e6f1d4..b1eb59b75 100644 --- a/.github/workflows/test-with-edm.yml +++ b/.github/workflows/test-with-edm.yml @@ -11,7 +11,7 @@ env: jobs: - # Test against EDM packages on Windows and OSX + # Test against EDM packages test-with-edm: strategy: matrix: