Skip to content

chore(deps): update dependency @types/node to v20.11.23 (#123) #407

chore(deps): update dependency @types/node to v20.11.23 (#123)

chore(deps): update dependency @types/node to v20.11.23 (#123) #407

Workflow file for this run

name: GoLang AIO CI
on:
pull_request:
push:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Dependencies
uses: ./.github/actions/setup-deps
- name: Format Node
working-directory: ./web
run: yarn format
- name: Format Go
run: |
gofmt_output=$(gofmt -s -d .)
if [ -n "$gofmt_output" ]; then
echo "Code formatting issues found:"
echo "$gofmt_output"
exit 1
fi
lint:
runs-on: ubuntu-latest
needs: format
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Dependencies
uses: ./.github/actions/setup-deps
- name: Lint Node
working-directory: ./web
run: yarn lint
- name: Analyze Go
run: go vet ./...
- name: Lint Go
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4
with:
version: latest
skip-pkg-cache: true
test:
runs-on: ubuntu-latest
needs: format
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Dependencies
uses: ./.github/actions/setup-deps
with:
setup-node: false
- name: Test Go
run: go test -v ./...
build-binary:
runs-on: ubuntu-latest
needs: [test, lint]
strategy:
fail-fast: false
matrix:
os: [darwin, linux, windows]
arch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Dependencies
uses: ./.github/actions/setup-deps
- name: Build Node
working-directory: ./web
run: yarn export
- name: Build Go
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: |
go build -o ./bin/golang-aio .
sha256sum ./bin/golang-aio > ./bin/golang-aio-checksum
- name: Upload Artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: golang-aio-${{ matrix.os }}-${{ matrix.arch }}
path: |
./bin/golang-aio
./bin/golang-aio-checksum
if-no-files-found: error
build-docker:
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Docker
uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c # v3
- name: Build Image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5
with:
context: .
tags: golang-aio:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
fan-in:
runs-on: ubuntu-latest
needs: [format, lint, test, build-binary, build-docker]
if: always()
steps:
- name: Check Jobs
shell: bash
env:
JOBS: ${{ toJSON(needs) }}
run: |
echo "Job status:"
echo $JOBS | jq -r 'to_entries[] | " - \(.key): \(.value.result)"'
for i in $(echo $JOBS | jq -r 'to_entries[] | .value.result'); do
if [ "$i" != "success" ] && [ "$i" != "skipped" ]; then
echo ""
echo "Status check not okay!"
exit 1
fi
done