Skip to content

fix: return errors found when parsing flags (#69) #83

fix: return errors found when parsing flags (#69)

fix: return errors found when parsing flags (#69) #83

Workflow file for this run

name: Makes valid measurements
on:
push:
branches:
- main
pull_request:
jobs:
checkup:
name: Inspect the code health
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21.x'
- name: Install dependencies
run: go get
- name: Build binary
run: go build
- name: Check formatting
run: test -z $(gofmt -l $(find . -name '*.go'))
- name: Run tests
run: go test -v ./...
measurement:
name: Monitor energy usage
needs: checkup
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Clean the environment
run: make clean
- name: Prepare the program
run: make build
- name: Sleep for a short while
run: ./etime sleep 4
env:
EMPORIA_DEVICE: ${{ secrets.EMPORIA_DEVICE }}
EMPORIA_USERNAME: ${{ secrets.EMPORIA_USERNAME }}
EMPORIA_PASSWORD: ${{ secrets.EMPORIA_PASSWORD }}
- name: Sleep for a bit longer
run: ./etime sleep 12
env:
EMPORIA_DEVICE: ${{ secrets.EMPORIA_DEVICE }}
EMPORIA_USERNAME: ${{ secrets.EMPORIA_USERNAME }}
EMPORIA_PASSWORD: ${{ secrets.EMPORIA_PASSWORD }}