{"id":22582282,"url":"https://github.com/canonical/starflow","last_synced_at":"2025-04-10T01:34:17.604Z","repository":{"id":266743061,"uuid":"859952609","full_name":"canonical/starflow","owner":"canonical","description":"✨craft team Github Workflows","archived":false,"fork":false,"pushed_at":"2025-03-29T15:48:55.000Z","size":71,"stargazers_count":0,"open_issues_count":9,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-29T16:30:16.125Z","etag":null,"topics":["actions","workflows"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canonical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-19T14:59:41.000Z","updated_at":"2025-03-21T13:15:14.000Z","dependencies_parsed_at":"2024-12-20T18:23:44.916Z","dependency_job_id":"edffeb11-3015-48c0-b5df-4dc2919f819d","html_url":"https://github.com/canonical/starflow","commit_stats":null,"previous_names":["canonical/starflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canonical%2Fstarflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canonical%2Fstarflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canonical%2Fstarflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canonical%2Fstarflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canonical","download_url":"https://codeload.github.com/canonical/starflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140915,"owners_count":21054369,"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":["actions","workflows"],"created_at":"2024-12-08T06:08:37.602Z","updated_at":"2025-04-10T01:34:17.571Z","avatar_url":"https://github.com/canonical.png","language":"Makefile","readme":"# starflow\n\nStarcraft team GHA Workflows\n\n# Reusable Workflows\n\nSome of these automations are provided as [Reusable workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows).\nFor these workflows, you can embed them in a workflow you run at the `job` level.\nExamples are provided below.\n\n## Lint\n\nThe lint workflow installs and runs the relevant linters for the repository. It expects the following\n`make` targets:\n\n- `setup-lint`: Installs relevant linters (only needs to work on Ubuntu)\n- `lint`: Runs relevant linters\n\n### Usage\n\nAn example workflow:\n\n```yaml\nname: QA\non:\n  push:\n    branches:\n      - \"main\"\n      - \"feature/*\"\n      - \"hotfix/*\"\n      - \"release/*\"\n      - \"renovate/*\"\n  pull_request:\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: lengau/starflow/lint@work/CRAFT-3602/test-workflows\n```\n\n## Policy check\n\nThe policy check workflow checks that contributions to the project follow both Canonical corporate policy\nand team policy. It checks:\n\n- That the user has signed the Canonical CLA\n- That commits follow [Starcraft team standards using Conventional Commits](https://github.com/canonical/starbase/blob/main/HACKING.rst#commits)\n\n### Usage\n\nAn example workflow that uses this reusable workflow:\n\n```yaml\nname: Check policy\non:\n  pull_request:\n\njobs:\n  policy:\n    uses: canonical/starflow/.github/workflows/policy.yaml@main\n```\n\n## Python security scanner\n\nThe Python security scanner workflow uses several tools (trivy, osv-scanner) to scan a\nPython project for security issues. It does the following:\n\n1. Creates a wheel of the project.\n2. Exports a `uv.lock` file (if present in the project) as two requirements files:\n   a. `requirements.txt` with no extras\n   b. `requirements-all.txt` with all available extras\n\nIf there are any existing `requirements*.txt` files in your project, it will scan those\nbelow too. Exporting a `uv.lock` file can be disabled by setting `uv-export: false`.\n\nWith [Trivy](https://github.com/aquasecurity/trivy), it:\n\n1. Scans the requirements files\n2. Scans the wheel file(s)\n3. Scans the project directory\n4. Installs each combination of (requirements, wheel) in a virtual environment and scans that environment.\n5. If a `uv.lock` file exists for the project, creates a virtual environment using `uv sync` and\n   scans that environment. `uv sync` can be configured with the `uv-sync-extra-args` input.\n\nWith [OSV-scanner](https://google.github.io/osv-scanner/) it:\n\n1. Scans the requirements files\n2. Scans the project directory\n\n### Usage\n\nAn example workflow for your own Python project that will use this workflow:\n\n```yaml\nname: Security scan\non:\n  pull_request:\n  push:\n    branches:\n      - main\n      - hotfix/*\n\njobs:\n  python-scans:\n    name: Scan Python project\n    uses: canonical/starflow/.github/workflows/scan-python.yaml@main\n    with:\n      # Additional packages to install on the Ubuntu runners for building\n      packages: python-apt-dev cargo\n      # Additional arguments to `find` when finding requirements files.\n      # This example ignores 'requirements-noble.txt'\n      requirements-find-args: \"! -name requirements-noble.txt\"\n      # Additional arguments to pass to osv-scanner.\n      # This example adds configuration from your project.\n      osv-extra-args: \"--config=source/osv-scanner.toml\"\n      # Use the standard extra args and ignore spread tests\n      trivy-extra-args: '--severity HIGH,CRITICAL --ignore-unfixed --skip-dirs \"tests/spread/**\"'\n```\n\n## Go security scanner\n\nThe Go security scanner workflow uses several tools (trivy, osv-scanner) to scan a\nGo project for security issues.\n\n### Usage\n\nAn example workflow for your own Go project that will use this workflow:\n\n```yaml\nname: Security scan\non:\n  pull_request:\n  push:\n    branches:\n      - main\n      - hotfix/*\n\njobs:\n  go-scans:\n    name: Scan Go project\n    uses: canonical/starflow/.github/workflows/scan-golang.yaml@main\n    with:\n      # Additional packages to install on the Ubuntu runners for building\n      packages: protoc-gen-go-1-3\n      # Additional arguments to pass to osv-scanner.\n      # This example adds configuration from your project.\n      osv-extra-args: \"--config=.osv-scanner.toml\"\n      # Use the standard extra args and ignore spread tests\n      trivy-extra-args: '--skip-dirs \"tests/spread/**\"'\n```\n\n## Python test runner\n\nThe Python test runner workflow uses GitHub workflows and `uv` to run Python tests in\nseveral forms. It:\n\n- Runs fast tests across multiple platforms and Python versions.\n- Runs all tests on Ubuntu with the oldest supported python version and uv resolution\n  set to `lowest`.\n- Runs slow tests across their own set of platforms and Python versions.\n- Uploads test coverage for tests as artefacts.\n\nIn order to do so, it expects the following `make` targets:\n\n- `setup-tests`: Configures the system, installing any other necessary tools.\n- `test-coverage`: Runs tests with test coverage. Fast and slow tests will use the\n  `PYTEST_ADDOPTS` environment variable to run with or without the `slow` mark.\n\nBecause we use the snaps of [codespell](https://snapcraft.io/codespell),\n[ruff](https://snapcraft.io/ruff) and [shellcheck](https://snapcraft.io/shellcheck)\nfrequently, this workflow installs those as well as uv.\n\nAn example workflow:\n\n```yaml\nname: Test Python\non:\n  pull_request:\n\njobs:\n  test:\n    uses: canonical/starflow/.github/workflows/test-python.yaml@main\n```\n\n# Other Configuration\n\nThis repository also contains our base renovate configuration. A repository may be\nconfigured to use this by adding the following to its `.github/renovate.json5` file:\n\n```json5\n{\n  extends: [\"github\u003ecanonical/starflow\"],\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanonical%2Fstarflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanonical%2Fstarflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanonical%2Fstarflow/lists"}