diff options
| author | Mike Frysinger <vapier@google.com> | 2020-02-15 13:49:10 -0500 |
|---|---|---|
| committer | Mike Frysinger <vapier@google.com> | 2020-02-16 05:12:33 +0000 |
| commit | b57e633433eaf32f9c2e3f398937f99a5319869c (patch) | |
| tree | bb2e3d2ec10d58e64af8cdd34e904a5881ff6bb2 | |
| parent | d21638424cc92d8fa00e7f440300c92d8532f5a8 (diff) | |
| download | git-repo-b57e633433eaf32f9c2e3f398937f99a5319869c.tar.gz | |
github: enable github actions for postsubmit testing
This gives us a bit of feedback by running our testsuite on Linux,
macOS, and Windows platforms. While Linux & macOS are passing,
Windows fails some of them. We can figure that out later. This
is better than what we have now which is manual one-offs.
Change-Id: I9d2d644be97ec76645db0bc15739e7679310a647
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255314
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
| -rw-r--r-- | .github/workflows/test-ci.yml | 31 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | tox.ini | 7 |
3 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml new file mode 100644 index 00000000..93061814 --- /dev/null +++ b/.github/workflows/test-ci.yml | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | # GitHub actions workflow. | ||
| 2 | # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | ||
| 3 | |||
| 4 | name: Test CI | ||
| 5 | |||
| 6 | on: | ||
| 7 | push: | ||
| 8 | branches: [master, repo-1, stable, maint] | ||
| 9 | tags: [v*] | ||
| 10 | |||
| 11 | jobs: | ||
| 12 | test: | ||
| 13 | strategy: | ||
| 14 | fail-fast: false | ||
| 15 | matrix: | ||
| 16 | os: [ubuntu-latest, macos-latest, windows-latest] | ||
| 17 | python-version: [2.7, 3.6, 3.7, 3.8] | ||
| 18 | runs-on: ${{ matrix.os }} | ||
| 19 | |||
| 20 | steps: | ||
| 21 | - uses: actions/checkout@v2 | ||
| 22 | - name: Set up Python ${{ matrix.python-version }} | ||
| 23 | uses: actions/setup-python@v1 | ||
| 24 | with: | ||
| 25 | python-version: ${{ matrix.python-version }} | ||
| 26 | - name: Install dependencies | ||
| 27 | run: | | ||
| 28 | python -m pip install --upgrade pip | ||
| 29 | pip install tox tox-gh-actions | ||
| 30 | - name: Test with tox | ||
| 31 | run: tox | ||
| @@ -15,6 +15,8 @@ that you can put anywhere in your path. | |||
| 15 | * [repo Hooks](./docs/repo-hooks.md) | 15 | * [repo Hooks](./docs/repo-hooks.md) |
| 16 | * [Submitting patches](./SUBMITTING_PATCHES.md) | 16 | * [Submitting patches](./SUBMITTING_PATCHES.md) |
| 17 | * Running Repo in [Microsoft Windows](./docs/windows.md) | 17 | * Running Repo in [Microsoft Windows](./docs/windows.md) |
| 18 | * GitHub mirror: <https://github.com/GerritCodeReview/git-repo> | ||
| 19 | * Postsubmit tests: <https://github.com/GerritCodeReview/git-repo/actions> | ||
| 18 | 20 | ||
| 19 | ## Install | 21 | ## Install |
| 20 | 22 | ||
| @@ -17,6 +17,13 @@ | |||
| 17 | [tox] | 17 | [tox] |
| 18 | envlist = py27, py36, py37, py38 | 18 | envlist = py27, py36, py37, py38 |
| 19 | 19 | ||
| 20 | [gh-actions] | ||
| 21 | python = | ||
| 22 | 2.7: py27 | ||
| 23 | 3.6: py36 | ||
| 24 | 3.7: py37 | ||
| 25 | 3.8: py38 | ||
| 26 | |||
| 20 | [testenv] | 27 | [testenv] |
| 21 | deps = pytest | 28 | deps = pytest |
| 22 | commands = {envpython} run_tests | 29 | commands = {envpython} run_tests |
