Skip to content

Commit

Permalink
ci: add e2e test step for windows
Browse files Browse the repository at this point in the history
Adds a workflow step to run e2e tests on the Windows runner.
There are TODOs included to be addressed before a merge with the
main branch. For now, this will live in the windev branch to
enable CI there.

Signed-off-by: Gavin Inglis <[email protected]>
  • Loading branch information
ginglis13 committed Oct 3, 2023
1 parent 69e2315 commit 5db1125
Showing 1 changed file with 85 additions and 5 deletions.
90 changes: 85 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ name: CI
on:
push:
branches:
- main
# TODO: revert to main on merge of windev branch with main
- windev
paths-ignore:
- '**.md'
- 'contrib/**'
- '.github/CODEOWNERS'
pull_request:
branches:
- main
# TODO: revert to main on merge of windev branch with main
- windev
paths-ignore:
- '**.md'
- 'contrib/**'
Expand All @@ -26,19 +28,40 @@ concurrency:

jobs:
gen-code-no-diff:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
[
[self-hosted, macos, amd64, 13, test],
[self-hosted, windows, amd64, test],
[windows-latest],
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: true
- run: make gen-code
- run: git diff --exit-code
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
[
[self-hosted, macos, amd64, 13, test],
[self-hosted, windows, amd64, test],
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-go@v4
with:
# Since this repository is not meant to be used as a library,
Expand Down Expand Up @@ -94,6 +117,7 @@ jobs:
cache: true
- run: make check-licenses
e2e-tests:
if: github.event.name == 'TODO skipping now to expedite windows ci'
strategy:
fail-fast: false
matrix:
Expand All @@ -111,7 +135,7 @@ jobs:
# We need to get all the git tags to make version injection work. See VERSION in Makefile for more detail.
fetch-depth: 0
persist-credentials: false
submodules: true
submodules: recursive
- name: Set output variables
id: vars
run: |
Expand Down Expand Up @@ -149,6 +173,62 @@ jobs:
git clean -f -d
REGISTRY=${{ steps.vars.outputs.has_creds == true && env.REGISTRY || '' }} make test-e2e
shell: zsh {0}
windows-e2e-tests:
strategy:
fail-fast: false
matrix:
os:
[
[self-hosted, windows, amd64, test],
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
# We need to get all the git tags to make version injection work. See VERSION in Makefile for more detail.
fetch-depth: 0
persist-credentials: false
submodules: recursive
# - name: Set output variables
# id: vars
# run: |
# has_creds=${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
# echo "has_creds=$has_creds" >> $GITHUB_OUTPUT
# - name: configure aws credentials
# uses: aws-actions/configure-aws-credentials@v4
# if: steps.vars.outputs.has_creds == true
# with:
# role-to-assume: ${{ secrets.ROLE }}
# role-session-name: credhelper-test
# aws-region: ${{ secrets.REGION }}
- name: Run some WSL commands
run: |
which wsl
wsl --list --verbose
$env:Path = "C:\Program Files\WSL\;" + $env:Path
echo $env:Path
which wsl
wsl --shutdown
wsl --unregister lima-finch
wsl --list --verbose
- name: Clean up previous files
run: |
make clean
cd deps/finch-core && make clean
- name: Build project
run: |
make
- name: Run e2e tests
run: |
# set path to use newer ssh version
$newPath = (";C:\Program Files\Git\bin\;" + "C:\Program Files\Git\usr\bin\;" + "$env:Path")
$env:Path = $newPath
which ssh
ssh -V
git status
git clean -f -d
make test-e2e
mdlint:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 5db1125

Please sign in to comment.