Skip to content

Init

Init #3

Workflow file for this run

name: CI Workflow
on:
push:
branches:
- main
tags:
- '*'
pull_request:
jobs:
unit_test:
name: Unit Tests
runs-on: ubuntu-latest
container:
image: golang:1.21
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run unit tests
run: go test -v ./...
compile:
name: Build
runs-on: ubuntu-latest
container:
image: golang:1.21
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Compile Go application
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o gauge-exporter -buildvcs=false -ldflags "-X main.appVersion=${{ github.ref_name }}"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: gauge-exporter
path: gauge-exporter
retention-days: 1
e2e_test:
name: End-to-End Tests
runs-on: ubuntu-latest
container:
image: php:8.3
needs: compile
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: gauge-exporter
- name: Install dependencies
uses: php-actions/composer@v6
working-directory: e2e_tests

Check failure on line 60 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI Workflow

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 60, Col: 9): Unexpected value 'working-directory'
- name: Run E2E tests
run: ./vendor/bin/phpunit --testdox
working-directory: e2e_tests