From 87ff4695d8ef5af9d7bb981f369631c7ee36a798 Mon Sep 17 00:00:00 2001 From: "Jessica Zhang (NY)" Date: Tue, 4 Feb 2025 10:34:34 -0500 Subject: [PATCH] Run github CI actions on fork PRs --- .github/workflows/codeql.yml | 3 +- .github/workflows/core_tests.yml | 125 ++++++++++++++------------- .github/workflows/deploy_website.yml | 3 + 3 files changed, 69 insertions(+), 62 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5f7ad437f90..51ec2f14992 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,7 +4,8 @@ on: push: branches: [ "main", "0.11_branch", "1.0_branch", "1.1_branch", "1.2_branch", "gh-pages" ] pull_request: - branches: [ "main" ] + branches: + - main schedule: - cron: "33 9 * * 0" diff --git a/.github/workflows/core_tests.yml b/.github/workflows/core_tests.yml index b97f5a88be3..8cc355f242e 100644 --- a/.github/workflows/core_tests.yml +++ b/.github/workflows/core_tests.yml @@ -1,88 +1,91 @@ name: facebookresearch/hydra/core_tests on: - push + push: + pull_request: + branches: + - main jobs: test_macos: runs-on: macos-latest strategy: matrix: py_version: - - '3.8' - - '3.9' - - '3.10' - - '3.11' + - '3.8' + - '3.9' + - '3.10' + - '3.11' steps: - - uses: actions/checkout@v4.1.0 - - uses: "./.github/actions/macos" - with: - py_version: "${{ matrix.py_version }}" - - name: Testing Hydra - run: |- - source $HOME/.bash_profile - export NOX_PYTHON_VERSIONS=${{ matrix.py_version }} - conda activate hydra - pip install nox dataclasses --progress-bar off - nox -s lint test_tools test_core \ - test_jupyter_notebooks lint_plugins test_plugins test_plugins_vs_core -ts + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/macos" + with: + py_version: "${{ matrix.py_version }}" + - name: Testing Hydra + run: |- + source $HOME/.bash_profile + export NOX_PYTHON_VERSIONS=${{ matrix.py_version }} + conda activate hydra + pip install nox dataclasses --progress-bar off + nox -s lint test_tools test_core \ + test_jupyter_notebooks lint_plugins test_plugins test_plugins_vs_core -ts test_linux: runs-on: ubuntu-latest strategy: matrix: py_version: - - '3.8' - - '3.9' - - '3.10' - - '3.11' + - '3.8' + - '3.9' + - '3.10' + - '3.11' steps: - - uses: actions/checkout@v4.1.0 - - uses: "./.github/actions/linux" - with: - py_version: "${{ matrix.py_version }}" - - name: Testing Hydra - run: |- - export PATH="$HOME/miniconda3/envs/hydra/bin:$PATH" - export NOX_PYTHON_VERSIONS=${{ matrix.py_version }} - pip install nox dataclasses --progress-bar off - nox -s lint test_tools test_core \ - test_jupyter_notebooks lint_plugins test_plugins test_plugins_vs_core -ts + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/linux" + with: + py_version: "${{ matrix.py_version }}" + - name: Testing Hydra + run: |- + export PATH="$HOME/miniconda3/envs/hydra/bin:$PATH" + export NOX_PYTHON_VERSIONS=${{ matrix.py_version }} + pip install nox dataclasses --progress-bar off + nox -s lint test_tools test_core \ + test_jupyter_notebooks lint_plugins test_plugins test_plugins_vs_core -ts test_win: runs-on: windows-latest strategy: matrix: py_version: - - '3.8' - - '3.9' - - '3.10' - - '3.11' + - '3.8' + - '3.9' + - '3.10' + - '3.11' steps: - - uses: actions/checkout@v4.1.0 - - uses: "./.github/actions/windows" - - name: Testing Hydra - run: |- - conda run -n hydra pip install nox --progress-bar off - set NOX_PYTHON_VERSIONS="${{ matrix.py_version }}" - set ConEmuDefaultCp=65001 - set PYTHONIOENCODING="utf_8" - nox -s lint test_tools test_core test_jupyter_notebooks lint_plugins test_plugins test_plugins_vs_core -ts - exit $LASTEXITCODE + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/windows" + - name: Testing Hydra + run: |- + conda run -n hydra pip install nox --progress-bar off + set NOX_PYTHON_VERSIONS="${{ matrix.py_version }}" + set ConEmuDefaultCp=65001 + set PYTHONIOENCODING="utf_8" + nox -s lint test_tools test_core test_jupyter_notebooks lint_plugins test_plugins test_plugins_vs_core -ts + exit $LASTEXITCODE test_linux_omc_dev: runs-on: ubuntu-latest strategy: matrix: py_version: - - '3.8' - - '3.9' - - '3.10' - - '3.11' + - '3.8' + - '3.9' + - '3.10' + - '3.11' steps: - - uses: actions/checkout@v4.1.0 - - uses: "./.github/actions/linux" - with: - py_version: "${{ matrix.py_version }}" - - name: Testing Hydra - run: |- - export PATH="$HOME/miniconda3/envs/hydra/bin:$PATH" - export NOX_PYTHON_VERSIONS=${{ matrix.py_version }} - export USE_OMEGACONF_DEV_VERSION=1 - pip install nox dataclasses --progress-bar off - nox -s test_core -ts + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/linux" + with: + py_version: "${{ matrix.py_version }}" + - name: Testing Hydra + run: |- + export PATH="$HOME/miniconda3/envs/hydra/bin:$PATH" + export NOX_PYTHON_VERSIONS=${{ matrix.py_version }} + export USE_OMEGACONF_DEV_VERSION=1 + pip install nox dataclasses --progress-bar off + nox -s test_core -ts diff --git a/.github/workflows/deploy_website.yml b/.github/workflows/deploy_website.yml index 9e879633df3..f786f2a45dc 100644 --- a/.github/workflows/deploy_website.yml +++ b/.github/workflows/deploy_website.yml @@ -5,6 +5,9 @@ on: branches: - main - deploy_website_hydra + pull_request: + branches: + - main jobs: deploy: