Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Go API CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Install MongoDB
run: |
sudo apt-get update
sudo apt-get install -y mongodb
- name: Start MongoDB
run: |
sudo service mongod start
- name: Run tests
run: |
go test ./...