Skip to content

Commit

Permalink
ci: first cut of running tests on macOS and Windows
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
myitcv committed Jan 31, 2020
1 parent 7cf7f31 commit 4c920d1
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 34 deletions.
60 changes: 43 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,52 @@ env:

name: Go
jobs:
test:
test-macos-windows:
strategy:
matrix:
os: [ubuntu-latest]
go_version: ["go1.12.14", "go1.13.5", "go1.14beta1"]
vim_flavor: ["vim", "gvim"]
vim_version: ["v8.1.1711", "v8.1.2056", "v8.2.0151"]
os: [macos-latest, windows-latest]
go_version: ["1.14beta1"]
vim_version: ["stable"]
runs-on: ${{ matrix.os }}
env:
GO_VERSION: ${{ matrix.go_version }}
VIM_FLAVOR: ${{ matrix.vim_flavor }}
VIM_VERSION: ${{ matrix.vim_version }}
steps:
- name: Install Vim
uses: rhysd/action-setup-vim@v1
with:
version: ${{ matrix.vim_version }}
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go_version }}
- name: Checkout code
uses: actions/checkout@v1
- name: Build docker image
run: ./_scripts/buildGovimImage.sh
- name: Run Docker, run!
if: success()
run: ./_scripts/runDockerRun.sh
- name: Tidy up
if: failure()
run: ./_scripts/afterFailure.sh
- name: Vim version
run: vim --version
- name: Go version
run: go version
- name: Run tests
run: go test ./...

# test:
# strategy:
# matrix:
# os: [ubuntu-latest]
# go_version: ["go1.12.14", "go1.13.5", "go1.14beta1"]
# vim_flavor: ["vim", "gvim"]
# vim_version: ["v8.1.1711", "v8.1.2056", "v8.2.0151"]
# runs-on: ${{ matrix.os }}
# env:
# GO_VERSION: ${{ matrix.go_version }}
# VIM_FLAVOR: ${{ matrix.vim_flavor }}
# VIM_VERSION: ${{ matrix.vim_version }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v1
# - name: Build docker image
# run: ./_scripts/buildGovimImage.sh
# - name: Run Docker, run!
# if: success()
# run: ./_scripts/runDockerRun.sh
# - name: Tidy up
# if: failure()
# run: ./_scripts/afterFailure.sh

60 changes: 43 additions & 17 deletions internal/cmd/genconfig/genconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,29 +266,55 @@ env:
name: Go
jobs:
test:
test-macos-windows:
strategy:
matrix:
os: [ubuntu-latest]
go_version: {{{ .GoVersions }}}
vim_flavor: {{{ .VimFlavors }}}
vim_version: {{{ .VimVersions }}}
os: [macos-latest, windows-latest]
go_version: ["1.14beta1"]
vim_version: ["stable"]
runs-on: ${{ matrix.os }}
env:
GO_VERSION: ${{ matrix.go_version }}
VIM_FLAVOR: ${{ matrix.vim_flavor }}
VIM_VERSION: ${{ matrix.vim_version }}
steps:
- name: Install Vim
uses: rhysd/action-setup-vim@v1
with:
version: ${{ matrix.vim_version }}
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go_version }}
- name: Checkout code
uses: actions/checkout@v1
- name: Build docker image
run: ./_scripts/buildGovimImage.sh
- name: Run Docker, run!
if: success()
run: ./_scripts/runDockerRun.sh
- name: Tidy up
if: failure()
run: ./_scripts/afterFailure.sh
- name: Vim version
run: vim --version
- name: Go version
run: go version
- name: Run tests
run: go test ./...
# test:
# strategy:
# matrix:
# os: [ubuntu-latest]
# go_version: {{{ .GoVersions }}}
# vim_flavor: {{{ .VimFlavors }}}
# vim_version: {{{ .VimVersions }}}
# runs-on: ${{ matrix.os }}
# env:
# GO_VERSION: ${{ matrix.go_version }}
# VIM_FLAVOR: ${{ matrix.vim_flavor }}
# VIM_VERSION: ${{ matrix.vim_version }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v1
# - name: Build docker image
# run: ./_scripts/buildGovimImage.sh
# - name: Run Docker, run!
# if: success()
# run: ./_scripts/runDockerRun.sh
# - name: Tidy up
# if: failure()
# run: ./_scripts/afterFailure.sh
`

const maxVersions = `# Code generated by genconfig. DO NOT EDIT.
Expand Down

0 comments on commit 4c920d1

Please sign in to comment.