diff --git a/.github/workflows/check-code-generation-task.yml b/.github/workflows/check-code-generation-task.yml index 97584ee2..f3b95d72 100644 --- a/.github/workflows/check-code-generation-task.yml +++ b/.github/workflows/check-code-generation-task.yml @@ -8,18 +8,18 @@ on: push: paths: - ".github/workflows/check-code-generation-task.ya?ml" - - "Taskfile.yml" + - "Taskfile.ya?ml" - "go.mod" - "go.sum" - - "**/*.go" + - "**.go" - "etc/schemas/**/*.json" pull_request: paths: - ".github/workflows/check-code-generation-task.ya?ml" - - "Taskfile.yml" + - "Taskfile.ya?ml" - "go.mod" - "go.sum" - - "**/*.go" + - "**.go" - "etc/schemas/**/*.json" jobs: diff --git a/.github/workflows/test-go-integration-task.yml b/.github/workflows/test-go-integration-task.yml index f7b98b3b..91e04288 100644 --- a/.github/workflows/test-go-integration-task.yml +++ b/.github/workflows/test-go-integration-task.yml @@ -7,6 +7,7 @@ env: # See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python PYTHON_VERSION: "3.9" +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows on: push: paths: @@ -28,6 +29,8 @@ on: - "poetry.lock" - "pyproject.toml" - "tests/**" + workflow_dispatch: + repository_dispatch: jobs: test: @@ -36,7 +39,7 @@ jobs: operating-system: - ubuntu-latest - windows-latest - - macOS-latest + - macos-latest runs-on: ${{ matrix.operating-system }} @@ -49,12 +52,6 @@ jobs: with: go-version: ${{ env.GO_VERSION }} - - name: Install Task - uses: arduino/setup-task@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x - - name: Install Python uses: actions/setup-python@v2 with: @@ -63,5 +60,11 @@ jobs: - name: Install Poetry run: pip install poetry + - name: Install Task + uses: arduino/setup-task@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + - name: Run integration tests run: task go:test-integration diff --git a/.github/workflows/test-go-task.yml b/.github/workflows/test-go-task.yml index 6937c9bd..dee99669 100644 --- a/.github/workflows/test-go-task.yml +++ b/.github/workflows/test-go-task.yml @@ -5,23 +5,26 @@ env: # See: https://github.com/actions/setup-go/tree/v2#readme GO_VERSION: "1.16" +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows on: push: paths: - ".github/workflows/test-go-task.ya?ml" - - "Taskfile.yml" - "go.mod" - "go.sum" - - "**/*.go" + - "Taskfile.ya?ml" + - "**.go" - "**/testdata/**" pull_request: paths: - ".github/workflows/test-go-task.ya?ml" - - "Taskfile.yml" - "go.mod" - "go.sum" - - "**/*.go" + - "Taskfile.ya?ml" + - "**.go" - "**/testdata/**" + workflow_dispatch: + repository_dispatch: jobs: test: @@ -30,7 +33,7 @@ jobs: operating-system: - ubuntu-latest - windows-latest - - macOS-latest + - macos-latest runs-on: ${{ matrix.operating-system }} diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index 640bb9fe..25f89d32 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -3,11 +3,11 @@ name: Test install script on: push: paths: - - ".github/workflows/test-install.yml" + - ".github/workflows/test-install.ya?ml" - "etc/install.sh" pull_request: paths: - - ".github/workflows/test-install.yml" + - ".github/workflows/test-install.ya?ml" - "etc/install.sh" schedule: # Run every day at 03:00 UTC to catch breakage caused by external events diff --git a/docs/siteversion/tests/__init__.py b/docs/siteversion/tests/__init__.py deleted file mode 100644 index b353c4a0..00000000 --- a/docs/siteversion/tests/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-python/__init__.py -# Copyright 2021 ARDUINO SA (http://www.arduino.cc/) -# -# This software is released under the GNU General Public License version 3, -# The terms of this license can be found at: -# https: // www.gnu.org/licenses/gpl-3.0.en.html -# -# You can be released from the requirements of the above licenses by purchasing -# a commercial license. Buying such a license is mandatory if you want to -# modify or otherwise use the software for commercial activities involving the -# Arduino software without disclosing the source code of your own applications. -# To purchase a commercial license, send an email to license@arduino.cc. diff --git a/docs/siteversion/tests/pytest.ini b/docs/siteversion/tests/pytest.ini deleted file mode 100644 index b8beed3f..00000000 --- a/docs/siteversion/tests/pytest.ini +++ /dev/null @@ -1,10 +0,0 @@ -# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-python/pytest.ini -[pytest] -filterwarnings = - error - ignore::DeprecationWarning - ignore::ResourceWarning - -# --capture=no - disable per-test capture -# --tb=long sets the length of the traceback in case of failures -addopts = --capture=no --tb=long --verbose diff --git a/docs/siteversion/tests/test_all.py b/docs/siteversion/tests/test_all.py deleted file mode 100644 index eb66ea7e..00000000 --- a/docs/siteversion/tests/test_all.py +++ /dev/null @@ -1,33 +0,0 @@ -# Source: -# https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-mkdocs-versioned/siteversion/test/test_all.py - -# Copyright 2020 ARDUINO SA (http://www.arduino.cc/) - -# This software is released under the GNU General Public License version 3 -# The terms of this license can be found at: -# https://www.gnu.org/licenses/gpl-3.0.en.html - -# You can be released from the requirements of the above licenses by purchasing -# a commercial license. Buying such a license is mandatory if you want to -# modify or otherwise use the software for commercial activities involving the -# Arduino software without disclosing the source code of your own applications. -# To purchase a commercial license, send an email to license@arduino.cc. -import siteversion - - -def test_get_docs_version(): - data = siteversion.get_docs_version("main", []) - assert data["version"] == "dev" - assert data["alias"] == "" - - release_names = ["1.4.x", "0.13.x"] - data = siteversion.get_docs_version("0.13.x", release_names) - assert data["version"] == "0.13" - assert data["alias"] == "" - data = siteversion.get_docs_version("1.4.x", release_names) - assert data["version"] == "1.4" - assert data["alias"] == "latest" - - data = siteversion.get_docs_version("0.1.x", []) - assert data["version"] is None - assert data["alias"] is None