Skip to content

parse process env

parse process env #175

Workflow file for this run

name: Maestro CI
on:
push:
branches: [ main ]
paths-ignore:
- 'frontend/**/*'
- 'www/**/*'
- 'README.md'
- 'LICENSE'
- '.gitignore'
pull_request:
branches: [ main ]
workflow_call:
jobs:
verified:
runs-on: ubuntu-latest
needs:
- build
- fmt
- install
- integration-test
- integration-test-windows
- lint
- test
- test-windows
- tidy
steps:
- run: echo "I can't believe the grass is green"
build:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- platform: darwin
architecture: amd64
- platform: darwin
architecture: arm64
- platform: linux
architecture: 386
- platform: linux
architecture: amd64
- platform: linux
architecture: arm
- platform: linux
architecture: arm64
- platform: windows
architecture: 386
- platform: windows
architecture: amd64
- platform: windows
architecture: arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: build
run: GOOS=${{matrix.platform}} GOARCH=${{matrix.architecture}} go build
fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: fmt maestro
run: go fmt .
- name: fmt composable
run: |
cd composable
go fmt .
- name: fmt git
run: |
cd git
go fmt .
- name: fmt testutil
run: |
cd testutil
go fmt .
- name: fmt util
run: |
cd util
go fmt .
- name: diff
run: git diff --exit-code
install:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: install from src
run: go install github.com/eighty4/maestro@${GITHUB_SHA}
integration-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: integration-test
run: |
go build
PATH=$PATH:$(pwd)
cd integration
cd rust
cargo build
cd ..
go run integration.go
integration-test-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: integration-test
shell: powershell
run: |
go build
$env:Path = "$pwd;" + $env:Path
cd integration
cd rust
cargo build
cd ..
go run integration.go
Exit $LASTEXITCODE
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin
- name: lint maestro
run: golangci-lint run
- name: lint composable
run: golangci-lint run
working-directory: composable
- name: lint git
run: golangci-lint run
working-directory: git
- name: lint testutil
run: golangci-lint run
working-directory: testutil
- name: lint
run: golangci-lint run
working-directory: util
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: git config
run: |
git config --global init.defaultBranch main
git config --global user.name "Adam McKee"
git config --global user.email "[email protected]"
- name: test
env:
MAESTRO_CI: true
MAESTRO_TEST_GIT: true
run: go list -f '{{.Dir}}' -m | xargs go test
test-windows:
runs-on: windows-2022
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: test
shell: powershell
run: |
$env:TMP="$env:USERPROFILE\AppData\Local\Temp"
$env:TEMP="$env:TMP"
go test
Exit $LASTEXITCODE
- name: test composable
shell: powershell
working-directory: composable
run: |
$env:TMP="$env:USERPROFILE\AppData\Local\Temp"
$env:TEMP="$env:TMP"
go test
Exit $LASTEXITCODE
- name: test git
shell: powershell
working-directory: git
run: |
$env:TMP="$env:USERPROFILE\AppData\Local\Temp"
$env:TEMP="$env:TMP"
go test
Exit $LASTEXITCODE
- name: test util
shell: powershell
working-directory: util
run: |
$env:TMP="$env:USERPROFILE\AppData\Local\Temp"
$env:TEMP="$env:TMP"
go test
Exit $LASTEXITCODE
tidy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: tidy maestro
run: go mod tidy
- name: tidy composable
run: go mod tidy
working-directory: composable
- name: tidy git
run: go mod tidy
working-directory: git
- name: tidy testutil
run: go mod tidy
working-directory: testutil
- name: tidy util
run: go mod tidy
working-directory: util
- name: diff
run: git diff --exit-code