Skip to content

Micrified is executing all Go tests! #15

Micrified is executing all Go tests!

Micrified is executing all Go tests! #15

Workflow file for this run

name: Go API tests
run-name: ${{ github.actor }} is executing all Go tests!
on: [push]
env:
TEST_HOSTNAME: "http://localhost:3070"
TEST_USERNAME: "tester"
TEST_PASSPHRASE: "password"
jobs:
go-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.22.3'
- id: setup-mysql
name: Install MySQL
uses: shogo82148/actions-setup-mysql@v1.34.0
with:
distribution: "mysql"
mysql-version: "8.0"
auto-start: "true"
root-password: "password"
- name: Setup SQL
run: |
mysql -uroot -ppassword < data/db_schema.sql
mysql -uroot -ppassword < data/db_setup.sql
sh data/gen_config.sh ${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock tester password > config.json
- name: Build
run: |
go build
- name: Test
run: |
./server config.json &
go test -v test/auth_test.go
go test -v test/blog_test.go
go test -v test/static_test.go