{"id":15584935,"url":"https://github.com/swiftlang/github-workflows","last_synced_at":"2025-05-03T07:31:00.133Z","repository":{"id":257807444,"uuid":"828025099","full_name":"swiftlang/github-workflows","owner":"swiftlang","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-25T20:29:53.000Z","size":191,"stargazers_count":52,"open_issues_count":20,"forks_count":21,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-25T20:36:17.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swiftlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-12T23:15:27.000Z","updated_at":"2025-04-25T20:29:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"c677d38e-d391-4623-aeaa-b640553356de","html_url":"https://github.com/swiftlang/github-workflows","commit_stats":null,"previous_names":["swiftlang/github-workflows"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fgithub-workflows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fgithub-workflows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fgithub-workflows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fgithub-workflows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiftlang","download_url":"https://codeload.github.com/swiftlang/github-workflows/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252156820,"owners_count":21703360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T21:00:34.860Z","updated_at":"2025-05-03T07:31:00.127Z","avatar_url":"https://github.com/swiftlang.png","language":"Python","readme":"# GitHub Actions Workflows\n\nThis repository will contain reusable workflows to minimize redundant workflows\nacross the organization. This effort will also facilitate the standardization of\ntesting processes while empowering repository code owners to customize their\ntesting plans as needed. The repository will contain workflows to support\ndifferent types of repositories, such as Swift Package and Swift Compiler.\n\nFor more details on reusable workflows, please refer to the [Reusing\nworkflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows)\nsection in the GitHub Docs.\n\n## Reusable workflow for Swift package repositories\n\nThere are different kinds of workflows that this repository offers:\n\n### Soundness\n\nThe soundness workflows provides a multitude of checks to ensure a repository is\nfollowing the best practices. By default each check is enabled but can be\ndisabled by passing the appropriate workflow input. We recommend to adopt all\nsoundness checks and enforce them on each PR.\n\nA recommended workflow looks like this:\n\n```yaml\nname: Pull request\n\non:\n  pull_request:\n    types: [opened, reopened, synchronize]\n\njobs:\n  soundness:\n    name: Soundness\n    uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main\n    with:\n      license_header_check_project_name: \"Swift.org\"\n```\n\n### Testing\n\nTo enable pull request testing for all supported Swift versions (5.9, 5.10,\n6.0, 6.1, nightly, and nightly-6.1) on Linux and Windows, add the following code example in\n`.github/workflows/pull_request.yml`:\n\n```yaml\nname: pull_request\n\non:\n  pull_request:\n    types: [opened, reopened, synchronize]\n\njobs:\n  tests:\n    name: tests\n    uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main\n```\n\nIf your package only supports newer compiler versions, you can exclude older\nversions by using the `*_exclude_swift_versions` workflow input:\n\n```yaml\nlinux_exclude_swift_versions: \"[{\\\"swift_version\\\": \\\"5.9\\\"}]\"\nwindows_exclude_swift_versions: \"[{\\\"swift_version\\\": \\\"5.9\\\"}]\"\n```\n\nAdditionally, if your package requires additional installed packages, you can\nuse the `pre_build_command`. For example, to install a package called\n`example`:\n\n```yaml\npre_build_command: \"which example || (apt update -q \u0026\u0026 apt install -yq example\"\n```\n\nmacOS platform support will be available soon.\n\n## Running workflows locally\n\nYou can run the Github Actions workflows locally using\n[act](https://github.com/nektos/act). To run all the jobs that run on a pull\nrequest, use the following command:\n\n```bash\n% act pull_request\n```\n\nTo run just a single job, use `workflow_call -j \u003cjob\u003e`, and specify the inputs\nthe job expects. For example, to run just shellcheck:\n\n```bash\n% act workflow_call -j soundness --input shell_check_enabled=true\n```\n\nTo bind-mount the working directory to the container, rather than a copy, use\n`--bind`. For example, to run just the formatting, and have the results\nreflected in your working directory:\n\n```bash\n% act --bind workflow_call -j soundness --input format_check_enabled=true\n```\n\nIf you'd like `act` to always run with certain flags, these can be be placed in\nan `.actrc` file either in the current working directory or your home\ndirectory, for example:\n\n```bash\n--container-architecture=linux/amd64\n--remote-name upstream\n--action-offline-mode\n```\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlang%2Fgithub-workflows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftlang%2Fgithub-workflows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlang%2Fgithub-workflows/lists"}