chore: bootstrap ermite-actions with license, README, lint and CI
- commit
- 2cc2a9e86a8168da74ec6e8746995595f550ad76
- author
- brice · · 2026-10-12 13:56 UTC
- parent
- none (root commit)
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
8 files · +145 -0
A .forgejo/workflows/ci.yml +41 -0
| @@ -0,0 +1,41 @@ | |||
| 1 | + | name: CI | |
| 2 | + | ||
| 3 | + | on: | |
| 4 | + | push: | |
| 5 | + | branches: [main] | |
| 6 | + | pull_request: | |
| 7 | + | ||
| 8 | + | env: | |
| 9 | + | # Test the module alone, with the versions in go.mod (never a go.work). | |
| 10 | + | GOWORK: "off" | |
| 11 | + | GOPRIVATE: bnema.dev/ermite* | |
| 12 | + | ||
| 13 | + | jobs: | |
| 14 | + | lint: | |
| 15 | + | name: Lint | |
| 16 | + | runs-on: ubuntu-latest | |
| 17 | + | steps: | |
| 18 | + | - uses: actions/checkout@v6 | |
| 19 | + | - uses: actions/setup-go@v5 | |
| 20 | + | with: | |
| 21 | + | go-version-file: go.mod | |
| 22 | + | cache: true | |
| 23 | + | - uses: golangci/golangci-lint-action@v9 | |
| 24 | + | with: | |
| 25 | + | version: v2.14.0 | |
| 26 | + | ||
| 27 | + | test: | |
| 28 | + | name: Test | |
| 29 | + | runs-on: ubuntu-latest | |
| 30 | + | steps: | |
| 31 | + | - uses: actions/checkout@v6 | |
| 32 | + | - uses: actions/setup-go@v5 | |
| 33 | + | with: | |
| 34 | + | go-version-file: go.mod | |
| 35 | + | cache: true | |
| 36 | + | - name: Verify tidy | |
| 37 | + | run: | | |
| 38 | + | go mod tidy | |
| 39 | + | git diff --exit-code -- go.mod go.sum | |
| 40 | + | - run: go vet ./... | |
| 41 | + | - run: go test -race ./... | |
| @@ -0,0 +1,41 @@ | |||||
| 1 | + | name: CI | |||
| 2 | + | ||||
| 3 | + | on: | |||
| 4 | + | push: | |||
| 5 | + | branches: [main] | |||
| 6 | + | pull_request: | |||
| 7 | + | ||||
| 8 | + | env: | |||
| 9 | + | # Test the module alone, with the versions in go.mod (never a go.work). | |||
| 10 | + | GOWORK: "off" | |||
| 11 | + | GOPRIVATE: bnema.dev/ermite* | |||
| 12 | + | ||||
| 13 | + | jobs: | |||
| 14 | + | lint: | |||
| 15 | + | name: Lint | |||
| 16 | + | runs-on: ubuntu-latest | |||
| 17 | + | steps: | |||
| 18 | + | - uses: actions/checkout@v6 | |||
| 19 | + | - uses: actions/setup-go@v5 | |||
| 20 | + | with: | |||
| 21 | + | go-version-file: go.mod | |||
| 22 | + | cache: true | |||
| 23 | + | - uses: golangci/golangci-lint-action@v9 | |||
| 24 | + | with: | |||
| 25 | + | version: v2.14.0 | |||
| 26 | + | ||||
| 27 | + | test: | |||
| 28 | + | name: Test | |||
| 29 | + | runs-on: ubuntu-latest | |||
| 30 | + | steps: | |||
| 31 | + | - uses: actions/checkout@v6 | |||
| 32 | + | - uses: actions/setup-go@v5 | |||
| 33 | + | with: | |||
| 34 | + | go-version-file: go.mod | |||
| 35 | + | cache: true | |||
| 36 | + | - name: Verify tidy | |||
| 37 | + | run: | | |||
| 38 | + | go mod tidy | |||
| 39 | + | git diff --exit-code -- go.mod go.sum | |||
| 40 | + | - run: go vet ./... | |||
| 41 | + | - run: go test -race ./... | |||
A .gitignore +2 -0
| @@ -0,0 +1,2 @@ | |||
| 1 | + | /tmp/ | |
| 2 | + | .worktrees/ | |
| @@ -0,0 +1,2 @@ | |||||
| 1 | + | /tmp/ | |||
| 2 | + | .worktrees/ | |||
A .golangci.yml +13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | + | version: "2" | |
| 2 | + | ||
| 3 | + | linters: | |
| 4 | + | enable: | |
| 5 | + | - errcheck | |
| 6 | + | - govet | |
| 7 | + | - ineffassign | |
| 8 | + | - misspell | |
| 9 | + | - staticcheck | |
| 10 | + | - unconvert | |
| 11 | + | - unused | |
| 12 | + | exclusions: | |
| 13 | + | generated: strict | |
| @@ -0,0 +1,13 @@ | |||||
| 1 | + | version: "2" | |||
| 2 | + | ||||
| 3 | + | linters: | |||
| 4 | + | enable: | |||
| 5 | + | - errcheck | |||
| 6 | + | - govet | |||
| 7 | + | - ineffassign | |||
| 8 | + | - misspell | |||
| 9 | + | - staticcheck | |||
| 10 | + | - unconvert | |||
| 11 | + | - unused | |||
| 12 | + | exclusions: | |||
| 13 | + | generated: strict | |||
A LICENSE +21 -0
| @@ -0,0 +1,21 @@ | |||
| 1 | + | MIT License | |
| 2 | + | ||
| 3 | + | Copyright (c) 2026 bnema | |
| 4 | + | ||
| 5 | + | Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 6 | + | of this software and associated documentation files (the "Software"), to deal | |
| 7 | + | in the Software without restriction, including without limitation the rights | |
| 8 | + | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 9 | + | copies of the Software, and to permit persons to whom the Software is | |
| 10 | + | furnished to do so, subject to the following conditions: | |
| 11 | + | ||
| 12 | + | The above copyright notice and this permission notice shall be included in all | |
| 13 | + | copies or substantial portions of the Software. | |
| 14 | + | ||
| 15 | + | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 16 | + | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 17 | + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 18 | + | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 19 | + | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 20 | + | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| 21 | + | SOFTWARE. | |
| @@ -0,0 +1,21 @@ | |||||
| 1 | + | MIT License | |||
| 2 | + | ||||
| 3 | + | Copyright (c) 2026 bnema | |||
| 4 | + | ||||
| 5 | + | Permission is hereby granted, free of charge, to any person obtaining a copy | |||
| 6 | + | of this software and associated documentation files (the "Software"), to deal | |||
| 7 | + | in the Software without restriction, including without limitation the rights | |||
| 8 | + | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
| 9 | + | copies of the Software, and to permit persons to whom the Software is | |||
| 10 | + | furnished to do so, subject to the following conditions: | |||
| 11 | + | ||||
| 12 | + | The above copyright notice and this permission notice shall be included in all | |||
| 13 | + | copies or substantial portions of the Software. | |||
| 14 | + | ||||
| 15 | + | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
| 16 | + | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
| 17 | + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
| 18 | + | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
| 19 | + | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
| 20 | + | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||
| 21 | + | SOFTWARE. | |||
A README.md +17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | + | # ermite-actions | |
| 2 | + | ||
| 3 | + | The GitHub Actions workflow language in Go: expressions `${{ }}`, template tokens and the workflow schema, the workflow model, matrices, job graphs and trigger filters. [ermite](https://git.bnema.dev/bnema/ermite) plans runs with it and [ermite-runner](https://git.bnema.dev/bnema/ermite-runner) executes jobs with it. | |
| 4 | + | ||
| 5 | + | The goal is GitHub's exact behaviour. Semantics and test cases come from GitHub's MIT sources ([actions/languageservices](https://github.com/actions/languageservices), [actions/runner](https://github.com/actions/runner)); see [THIRD_PARTY.md](THIRD_PARTY.md). | |
| 6 | + | ||
| 7 | + | Status: early development, no stable API. | |
| 8 | + | ||
| 9 | + | ## Test | |
| 10 | + | ||
| 11 | + | ```sh | |
| 12 | + | go test -race ./... | |
| 13 | + | ``` | |
| 14 | + | ||
| 15 | + | ## License | |
| 16 | + | ||
| 17 | + | MIT. See [LICENSE](LICENSE). | |
| @@ -0,0 +1,17 @@ | |||||
| 1 | + | # ermite-actions | |||
| 2 | + | ||||
| 3 | + | The GitHub Actions workflow language in Go: expressions `${{ }}`, template tokens and the workflow schema, the workflow model, matrices, job graphs and trigger filters. [ermite](https://git.bnema.dev/bnema/ermite) plans runs with it and [ermite-runner](https://git.bnema.dev/bnema/ermite-runner) executes jobs with it. | |||
| 4 | + | ||||
| 5 | + | The goal is GitHub's exact behaviour. Semantics and test cases come from GitHub's MIT sources ([actions/languageservices](https://github.com/actions/languageservices), [actions/runner](https://github.com/actions/runner)); see [THIRD_PARTY.md](THIRD_PARTY.md). | |||
| 6 | + | ||||
| 7 | + | Status: early development, no stable API. | |||
| 8 | + | ||||
| 9 | + | ## Test | |||
| 10 | + | ||||
| 11 | + | ```sh | |||
| 12 | + | go test -race ./... | |||
| 13 | + | ``` | |||
| 14 | + | ||||
| 15 | + | ## License | |||
| 16 | + | ||||
| 17 | + | MIT. See [LICENSE](LICENSE). | |||
A THIRD_PARTY.md +35 -0
| @@ -0,0 +1,35 @@ | |||
| 1 | + | # Third-party material | |
| 2 | + | ||
| 3 | + | Test fixtures and schemas under `testdata/` and `template/schema/` are copied or ported from the projects below. Each copied file names its source in its first lines or in a `SOURCE` file next to it. | |
| 4 | + | ||
| 5 | + | ## actions/languageservices | |
| 6 | + | ||
| 7 | + | https://github.com/actions/languageservices | |
| 8 | + | ||
| 9 | + | ``` | |
| 10 | + | MIT License | |
| 11 | + | ||
| 12 | + | Copyright GitHub, Inc. | |
| 13 | + | ||
| 14 | + | Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 15 | + | of this software and associated documentation files (the "Software"), to deal | |
| 16 | + | in the Software without restriction, including without limitation the rights | |
| 17 | + | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 18 | + | copies of the Software, and to permit persons to whom the Software is | |
| 19 | + | furnished to do so, subject to the following conditions: | |
| 20 | + | ||
| 21 | + | The above copyright notice and this permission notice shall be included in all | |
| 22 | + | copies or substantial portions of the Software. | |
| 23 | + | ||
| 24 | + | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 25 | + | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 26 | + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 27 | + | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 28 | + | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 29 | + | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| 30 | + | SOFTWARE. | |
| 31 | + | ``` | |
| 32 | + | ||
| 33 | + | ## actions/runner | |
| 34 | + | ||
| 35 | + | https://github.com/actions/runner — MIT License, Copyright (c) GitHub, Inc. Same terms as above. | |
| @@ -0,0 +1,35 @@ | |||||
| 1 | + | # Third-party material | |||
| 2 | + | ||||
| 3 | + | Test fixtures and schemas under `testdata/` and `template/schema/` are copied or ported from the projects below. Each copied file names its source in its first lines or in a `SOURCE` file next to it. | |||
| 4 | + | ||||
| 5 | + | ## actions/languageservices | |||
| 6 | + | ||||
| 7 | + | https://github.com/actions/languageservices | |||
| 8 | + | ||||
| 9 | + | ``` | |||
| 10 | + | MIT License | |||
| 11 | + | ||||
| 12 | + | Copyright GitHub, Inc. | |||
| 13 | + | ||||
| 14 | + | Permission is hereby granted, free of charge, to any person obtaining a copy | |||
| 15 | + | of this software and associated documentation files (the "Software"), to deal | |||
| 16 | + | in the Software without restriction, including without limitation the rights | |||
| 17 | + | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
| 18 | + | copies of the Software, and to permit persons to whom the Software is | |||
| 19 | + | furnished to do so, subject to the following conditions: | |||
| 20 | + | ||||
| 21 | + | The above copyright notice and this permission notice shall be included in all | |||
| 22 | + | copies or substantial portions of the Software. | |||
| 23 | + | ||||
| 24 | + | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
| 25 | + | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
| 26 | + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
| 27 | + | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
| 28 | + | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
| 29 | + | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||
| 30 | + | SOFTWARE. | |||
| 31 | + | ``` | |||
| 32 | + | ||||
| 33 | + | ## actions/runner | |||
| 34 | + | ||||
| 35 | + | https://github.com/actions/runner — MIT License, Copyright (c) GitHub, Inc. Same terms as above. | |||
A doc.go +13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | + | // SPDX-License-Identifier: MIT | |
| 2 | + | ||
| 3 | + | // Package actions is the root of ermite-actions, an implementation of the | |
| 4 | + | // GitHub Actions workflow language in Go: expressions (package expr), | |
| 5 | + | // template tokens and the workflow schema (package template), and the | |
| 6 | + | // workflow model with matrices, job graphs and trigger filters (package | |
| 7 | + | // workflow). ermite plans runs with it and ermite-runner executes jobs with | |
| 8 | + | // it, so both evaluate workflows the same way. | |
| 9 | + | // | |
| 10 | + | // The target is GitHub's exact behaviour. Semantics come from GitHub's MIT | |
| 11 | + | // sources (actions/languageservices, actions/runner) and from recordings of | |
| 12 | + | // runs on github.com. | |
| 13 | + | package actions | |
| @@ -0,0 +1,13 @@ | |||||
| 1 | + | // SPDX-License-Identifier: MIT | |||
| 2 | + | ||||
| 3 | + | // Package actions is the root of ermite-actions, an implementation of the | |||
| 4 | + | // GitHub Actions workflow language in Go: expressions (package expr), | |||
| 5 | + | // template tokens and the workflow schema (package template), and the | |||
| 6 | + | // workflow model with matrices, job graphs and trigger filters (package | |||
| 7 | + | // workflow). ermite plans runs with it and ermite-runner executes jobs with | |||
| 8 | + | // it, so both evaluate workflows the same way. | |||
| 9 | + | // | |||
| 10 | + | // The target is GitHub's exact behaviour. Semantics come from GitHub's MIT | |||
| 11 | + | // sources (actions/languageservices, actions/runner) and from recordings of | |||
| 12 | + | // runs on github.com. | |||
| 13 | + | package actions | |||
A go.mod +3 -0
| @@ -0,0 +1,3 @@ | |||
| 1 | + | module bnema.dev/ermite-actions | |
| 2 | + | ||
| 3 | + | go 1.27.1 | |
| @@ -0,0 +1,3 @@ | |||||
| 1 | + | module bnema.dev/ermite-actions | |||
| 2 | + | ||||
| 3 | + | go 1.27.1 | |||