pulumi/.github/workflows
Abhinav Gupta 8f594326a2
ci: Don't run codegen tests for PRs
We currently run all codegen tests in pkg/codegen/$lang
for every PR.
These tests take quite a while to run and lock up many GitHub workers
for this entire duration.

This change attempts to address this issue
by running codegen tests only for those PRs
that touch the codegen directories.

The machinery to make this work is roughly as follows:

- In the on-pr workflow, when we're figuring out what we're doing,
  we check if we've changed codegen files.
  We use [paths-filter] to do this.
- We decide whether we want to run codegen tests based on those files,
  and pass that onto the test matrix generator.
- The test matrix generator filters out these packages
  and their subpackages from the list of tests under consideration.
- Everything else proceeds as normal.

[paths-filter]: https://github.com/dorny/paths-filter

Things to note:

- The test-codegen input defaults to true.
  All other invocations will run with codegen tests
  so these will continue to run on merge.
  Only PRs (from on-pr.yml) set it to false.
- Since the number of tests is remarkably smaller without these tests,
  we can significantly reduce the number of partitions we use
  for pkg/ unit tests.
  This should alleviate pressure on GitHub workers further.

This is a pretty blunt approach to the problem.
If we wanted to be more targeted,
instead of filtering at the get-job-matrix.py level,
we could instead set an environment variable
and add t.Skips in {program,sdk,type}_driver
if that environment variable is set.
And we can still do that in the future
if we decide that maintaining this list is too much.

Resolves #12334
2023-03-13 11:18:38 -07:00
..
ci-build-binaries.yml feat: sign pulumi binaries with cosign 2022-12-16 09:32:51 -08:00
ci-build-sdks.yml Remove dotnet 2022-12-13 16:13:53 +00:00
ci-info.yml ci: Update post-release PR to align with release process 2022-10-18 22:45:59 -07:00
ci-lint.yml ci/lint: Upgrade to golangci-lint v1.51 2023-02-03 14:19:32 -08:00
ci-prepare-release.yml feat: sign pulumi binaries with cosign 2022-12-16 09:32:51 -08:00
ci-run-test.yml ci: Run action-install-gh-release with auth 2023-03-01 17:05:40 -08:00
ci-test-codegen.yml ci: Enable testing of language version sets 2022-09-21 09:48:38 -07:00
ci-test-docs-generation.yml Replace deprecated command with environment file 2023-02-20 11:14:39 +09:00
ci.yml ci: Don't run codegen tests for PRs 2023-03-13 11:18:38 -07:00
command-dispatch.yml ci: ensure trunk is always green 2022-09-13 13:38:14 -07:00
download-pulumi-cron.yml Replace deprecated command with environment file 2023-02-20 11:14:39 +09:00
on-community-pr.yml ci: fix community contributor workflows 2022-09-21 17:39:15 -07:00
on-merge.yml feat: sign pulumi binaries with cosign 2022-12-16 09:32:51 -08:00
on-pr-changelog.yml ci: fix community contributor workflows 2022-09-21 17:39:15 -07:00
on-pr-target.yml ci: Refactor linear-history check to run on pull request target for community PRs 2022-11-15 15:17:35 -08:00
on-pr.yml ci: Don't run codegen tests for PRs 2023-03-13 11:18:38 -07:00
on-release.yml ci: Update post-release PR to align with release process 2022-10-18 22:45:59 -07:00
pr-test-acceptance-on-dispatch.yml Rename "Smoke" test to "Acceptance" tests 2023-01-30 15:38:37 -05:00
pr-test-codegen-on-pr.yml ci: Clean up excess permissions, fix acceptance tests job 2022-09-15 17:48:16 -07:00
pr-test-codegen-test-on-dispatch.yml Replace deprecated command with environment file 2023-02-20 11:14:39 +09:00
pr-test-docs-gen-on-pr.yml ci: Clean up excess permissions, fix acceptance tests job 2022-09-15 17:48:16 -07:00
pr-test-docs-generation-on-dispatch.yml Replace deprecated command with environment file 2023-02-20 11:14:39 +09:00
rebase.yml ci/rebase: Run for members and owners 2023-02-19 18:18:06 -08:00
release-homebrew-tap.yml ci: Enable gh cli in every step of job 2022-10-04 23:23:43 -07:00
release-pr.yml ci: Update post-release PR to align with release process 2022-10-18 22:45:59 -07:00
release.pub ci: ensure trunk is always green 2022-09-13 13:38:14 -07:00
release.yml ci: Run action-install-gh-release with auth 2023-03-01 17:05:40 -08:00
trigger-homebrew-event.yml ci: Reenable Brew publishing after GH runners removed brew from path 2022-09-27 11:10:38 -07:00
trigger-release-docs-event.yml Enable command dispatch workflow for dealing with PRs (#5851) 2020-12-07 19:29:04 +00:00