debug #171
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: [master] | |
paths: | |
- "go/**" | |
- ".github/workflows/go.yml" | |
pull_request: | |
paths: | |
- "go/**" | |
- ".github/workflows/go.yml" | |
env: | |
LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_GO }} | |
LAUNCHABLE_DEBUG: 1 | |
LAUNCHABLE_REPORT_ERROR: 1 | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: go | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/checkout@v2 | |
with: | |
repository: launchableinc/cli | |
ref: main | |
path: cli | |
- uses: actions/setup-python@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel setuptools_scm | |
pip install launchable | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
- name: Install dependencies | |
run: | | |
go install github.com/jstemmer/go-junit-report@latest | |
- run: "launchable verify" | |
- run: "ls .." | |
- run: "ls" | |
- name: Record commits and build | |
run: 'launchable record build --name "$GITHUB_RUN_ID" --source .. --source=cli=../cli' # care for working-directory path | |
- name: Subset | |
run: go test -list="Test|Example" ./... | launchable subset --confidence 80% go-test > launchable-subset.txt | |
- name: Test | |
run: go test $(cat launchable-subset.txt) ./... -v 2>&1 | go-junit-report -set-exit-code > report.xml | |
- name: Record | |
run: launchable record tests go-test report.xml | |
if: always() |