Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
feedmeapples committed Mar 9, 2023
1 parent ae0ecc6 commit c5df28e
Showing 1 changed file with 42 additions and 32 deletions.
74 changes: 42 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,63 @@ on:
branches: [main]

jobs:
test:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Print build information
run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}, os: ${{ matrix.os }}"
# test:
# strategy:
# fail-fast: true
# matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - name: Print build information
# run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}, os: ${{ matrix.os }}"

- uses: actions/checkout@v3
# - uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
check-latest: true
# - name: Set up Go
# uses: actions/setup-go@v3
# with:
# go-version-file: "go.mod"
# check-latest: true

- name: Test
env:
CGO_ENABLED: 0
run: go test -v ./...
# - name: Test
# env:
# CGO_ENABLED: 0
# run: go test -v ./...

test-shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# test-shellcheck:
# name: Shellcheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
ignore_paths: ./.devcontainer
# - name: Run ShellCheck
# uses: ludeeus/action-shellcheck@master
# with:
# ignore_paths: ./.devcontainer

test-install:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
shell: [sh, bash, zsh]
os: [ubuntu-latest]
shell: [fish, zsh]
runs-on: ${{ matrix.os }}
steps:
- name: Print build information
run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}"

- uses: actions/checkout@v3

- name: Install ${{matrix.shell}} using apt-get
if: matrix.os == 'ubuntu-latest'
run: "sudo apt-get install -y ${{ matrix.shell }}"

- name: Install ${{matrix.shell}} using Homebrew
if: matrix.os == 'macos-latest'
run: "brew update && brew install ${{ matrix.shell }}"

- name: Set SHELL to ${{ matrix.shell }}
run: "env SHELL=$(which ${{ matrix.shell }})"

- name: "Run with ${{ matrix.shell }}"
shell: ${{ matrix.shell }}
run: sh -c '${{ matrix.shell }} -c "./install.sh"'
run: ./install.sh

0 comments on commit c5df28e

Please sign in to comment.