Adding service DB in Github action

This is so useful for testing purposes, plus it’s getting easier to do so. Let’s take a look for PostgreSQL and MySQL. Adding PostgreSQL in Github action name: Build on: push jobs: build: runs-on: ubuntu-latest services: # Label used to access the service container postgres: # Docker Hub image image: postgres:13 # Provide the password for postgres env: POSTGRES_USER: root POSTGRES_PASSWORD: test POSTGRES_DB: sqljson # Set health checks to wait until postgres has started options: >---health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 steps: - uses: actions/checkout@v2 - name: Setup go uses: actions/setup-go@v2 with: go-version: ^1....

March 5, 2022 · 2 min · Nolan

Check for misspelled words

Checking for typos & misspell words I came across that project client9/misspell on github that aims to: “Correct commonly misspelled English words… quickly.” So I decided to try it directly for that blog by using a github action. Implementation Github action: name: Go on: [push, pull_request] jobs: build: name: Check for misspell runs-on: ubuntu-latest container: golang:1.15-buster steps: - uses: actions/checkout@v2 - run: |GO111MODULE=on go get -u github.com/client9/misspell/cmd/misspell@v0.3.4 misspell -error misspell blog/content/posts/*....

April 27, 2021 · 1 min · Nolan