github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/docs/ci/actions.md (about) 1 # GitHub Actions 2 3 This documents gives a brief overview of the existing GitHub Actions on the repo 4 5 ## lint 6 7 Runs this [golang linter] over the code, this is the [linter configuration file]. 8 9 ### When is executed 10 11 PR opened and pushing changes to PRs. 12 13 ## ok-to-test 14 15 Part of our setup for running tests on PRs from forks, you can read more about it 16 in the [ok-to-test document]. 17 18 ### When is executed 19 20 PR opened and pushing changes to PRs. 21 22 ## push-docker-develop 23 24 Pushes docker images to docker hub, the images pushed are: 25 * `hermeznetwork/supernets2-node:develop` 26 27 ### When is executed 28 29 Changes pushed to the `develop` branch. 30 31 ## push-docker 32 33 Pushes docker images to docker hub, the images pushed are: 34 * `hermeznetwork/supernets2-node:latest` 35 36 ### When is executed 37 38 Changes pushed to the `main` branch. 39 40 ## test-e2e 41 42 Runs e2e tests divided in several groups executed in parallel, read more about 43 [CI groups]. 44 45 ### When is executed 46 47 PR opened and pushing changes to PRs. There are two variants, `trusted` and 48 `from-fork`, depending on the procedence of the PR, more about it in the 49 [ok-to-test document]. 50 51 ## test-full-non-e2e 52 53 Runs all the non-e2e tests. 54 55 ### When is executed 56 57 PR opened and pushing changes to PRs. There are two variants, `trusted` and 58 `from-fork`, depending on the procedence of the PR, more about it in the 59 [ok-to-test document]. 60 61 ## updatedeps 62 63 The `supernets2-node` repo requires some external resources for working. We call 64 these resources custom dependencies (as opposed to the golang packages required 65 by the code). 66 67 The goal of the `updatedeps` action is to keep these custom dependencies up to 68 date. It checks the external resources with content required by this repo and 69 proposes a PR in case it finds any changes. The code executed can be found in 70 the [dependencies package]. 71 72 Currently we are checking [three types of custom dependencies]: 73 * External docker images used in the [docker compose file]. For each image the 74 code compares the digest existing in the docker compose file with the digest 75 returned by docker hub API, if they differ it includes the new one in the docker 76 compose file. 77 * Protocol buffer files from [comms protocol repo]: after checking the files 78 for changes the client/server golang code is generated from them. 79 * Test vectors from the [test vectors repo]. 80 81 With all the potential changes we create a new PR and the tests are run on it, 82 so that we can review and eventually approve the changes to be included in the 83 `supernets2-node` repo. 84 85 ### When is executed 86 87 It runs as an scheduled action, every 3 hours. 88 89 [golang linter]: https://golangci-lint.run/ 90 [linter configuration file]: ../../.golangci.yml 91 [ok-to-test document]: ./ok-to-test.md 92 [CI groups]: ./groups.md 93 [dependencies package]: ../../scripts/cmd/dependencies 94 [three types of custom dependencies]: ../../scripts/cmd/dependencies.go 95 [docker compose file]: ../../docker-compose.yml 96 [comms protocol repo]: https://github.com/0xPolygonHermez/supernets2-comms-protocol/ 97 [test vectors repo]: https://github.com/0xPolygonHermez/supernets2-testvectors