Skip to content

fix: Return not acceptable if question already answered #150

fix: Return not acceptable if question already answered

fix: Return not acceptable if question already answered #150

Workflow file for this run

name: Go
on:
push:
branches: [ "main" ]
paths-ignore:
- .github/**
- infra/**
pull_request:
branches: [ "main" ]
paths-ignore:
- .github/**
- infra/**
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
container:
image: golang:1.22.1-alpine3.19
steps:
- uses: actions/checkout@v4
- name: Build
run: go build -v ./...
working-directory: ./src/
- name: Test
run: go test -v ./...
working-directory: ./src/
lint:
runs-on: ubuntu-22.04
container:
image: cytopia/goimports:latest
steps:
- uses: actions/checkout@v4
- name: Check style
uses: actions/github-script@v6
with:
script: |
const { execSync } = require('child_process');
try {
const goimportsOutput = execSync("goimports -local 'questspace/' -d -e ./src", { encoding: 'utf-8' });
if (goimportsOutput) {
console.error(goimportsOutput);
core.setFailed('Found style issues');
}
} catch (err) {
console.error('Error executing goimports: ', err);
core.setFailed('Command "goimports" failed')
}