Skip to content

Fix: blogs api

Fix: blogs api #4155

Workflow file for this run

name: Build
on: push
jobs:
run_tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: website_admin_test
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/setup-go@v2
with:
go-version: "^1.17.5"
- name: Run API test
run: |
go test jobs
go test contact
go test sitemap
go test blogs
env:
DB_HOST: localhost
DB_NAME: website_admin_test
SENDER: ${{ secrets.SENDER }}
RECEIVER: "[email protected]"
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
REGION: ${{ secrets.AWS_REGION }}
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/setup-go@v2
with:
go-version: "^1.17.5"
- uses: actions/setup-node@v1
with:
node-version: "18"
- name: Build frontend
run: |
cd vue-frontend
yarn install --frozen-lockfile
npx prettier -c .
npx eslint .
yarn build
- name: Build backend
run: |
GOOS=linux GOARCH=amd64 go build -o main main.go