Skip to content

Update CI configuration to support all branches and fetch dependencie… #49

Update CI configuration to support all branches and fetch dependencie…

Update CI configuration to support all branches and fetch dependencie… #49

Workflow file for this run

name: E2E Tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
e2e-tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Get branch name
id: branch-name
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
- name: Use go get with current branch if not master
run: |
BRANCH_NAME="${{ steps.branch-name.outputs.branch }}"
if [ "$BRANCH_NAME" != "master" ]; then
go get github.com/fumiya-kume/mdefaults@$BRANCH_NAME
fi
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Build
run: go build -o mdefaults ./cmd/mdefaults
- name: Run E2E Tests
run: |
go run ./test/e2e/run_tests.go --verbose