From 33c4fc979559a7d404eacc373ac19d327681e9b4 Mon Sep 17 00:00:00 2001 From: "Pey Lian Lim (Github)" <2090236+pllim@users.noreply.github.com> Date: Thu, 8 Dec 2022 18:42:34 -0500 Subject: [PATCH] TST: Add RC testing workflow and update existing --- .github/workflows/ci_cron_weekly.yml | 3 ++ .github/workflows/ci_workflows.yml | 3 ++ .github/workflows/codeql-analysis.yml | 3 ++ .github/workflows/predeps_workflows.yml | 53 +++++++++++++++++++++++++ tox.ini | 6 ++- 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/predeps_workflows.yml diff --git a/.github/workflows/ci_cron_weekly.yml b/.github/workflows/ci_cron_weekly.yml index 8d18d00a08..7817f9405a 100644 --- a/.github/workflows/ci_cron_weekly.yml +++ b/.github/workflows/ci_cron_weekly.yml @@ -7,6 +7,9 @@ on: # run at 9am UTC on Mondays - cron: '0 9 * * 1' +permissions: + contents: read + jobs: # The linkcheck job tests that the links in the docs point to real places # The if statement is to prevent cron from running on forks. diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index a86fff507a..427ec1c28c 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -13,6 +13,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + jobs: # Github Actions supports ubuntu, windows, and macos virtual environments: # https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4c46da726b..688f69dbff 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -10,6 +10,9 @@ on: # run every Monday at 3am UTC - cron: '0 3 * * 1' +permissions: + contents: read + jobs: analyze: name: Analyze diff --git a/.github/workflows/predeps_workflows.yml b/.github/workflows/predeps_workflows.yml new file mode 100644 index 0000000000..13bf18250c --- /dev/null +++ b/.github/workflows/predeps_workflows.yml @@ -0,0 +1,53 @@ +name: rc-testing + +on: + workflow_dispatch: + # REMOVE ME + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + # Github Actions supports ubuntu, windows, and macos virtual environments: + # https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners + ci_tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + + - name: RC testing on Linux with remote data + os: ubuntu-latest + python: '3.11' + toxenv: py311-test-predeps + toxposargs: --remote-data + + - name: RC testing on OSX + os: macos-latest + python: 3.9 + toxenv: py39-test-predeps + + - name: RC testing on Windows + os: windows-latest + python: '3.10' + toxenv: py310-test-predeps + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up python ${{ matrix.python }} on ${{ matrix.os }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Install base dependencies + run: python -m pip install --upgrade pip tox + - name: Test/run with tox + run: tox -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }} diff --git a/tox.ini b/tox.ini index 58985ec44a..981f080cdf 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{38,39,310,311}-test{,-alldeps,-devdeps}{,-cov} + py{38,39,310,311}-test{,-alldeps,-devdeps,-predeps}{,-cov} linkcheck codestyle pep517 @@ -71,6 +71,10 @@ commands = cov: pytest --pyargs jdaviz {toxinidir}/docs --cov jdaviz --cov-config={toxinidir}/setup.cfg {posargs} cov: coverage xml -o {toxinidir}/coverage.xml +pip_pre = + predeps: true + !predeps: false + [testenv:linkcheck] changedir = docs description = check the links in the HTML docs