-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add actions for golang * Add MARIADB in actions * Add port and init mariaDB * Using ip:port * No ip * Test show docker * Show docker logs * Stop default mysql * Try env * Add ls * Try login db * Using ip * Using localhost * Add health check * Add MYSQL_DATABASE * Remove test_mariadb * Try clean code * Add more test * Get more cover info * Long timeout * Remove check * Remove travis.yml
- Loading branch information
Showing
4 changed files
with
65 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Go | ||
|
||
on: push | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
services: | ||
mariadb: | ||
image: mariadb:10.1.48-bionic | ||
ports: | ||
- 3306:3306 | ||
env: | ||
MYSQL_DATABASE: mailbox | ||
MYSQL_ROOT_PASSWORD: mailboxdbs | ||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=4s --health-retries=5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Add hosts to /etc/hosts | ||
run: | | ||
sudo echo "127.0.0.1 MARIADB" | sudo tee -a /etc/hosts | ||
sudo cat /etc/hosts | ||
- name: ps docker | ||
run: | | ||
docker ps --all | ||
- name: init mariadb | ||
run: | | ||
ls -alh | ||
mysql -h MARIADB -uroot -pmailboxdbs < ./sql/database.sql | ||
mysql -h MARIADB -uroot -pmailboxdbs mailbox < ./sql/tables.sql | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16.3 | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Run more test | ||
run: | | ||
go get -v ./... | ||
go test -race ./campaign... | ||
go test -race ./mails... | ||
go test -race ./reader... | ||
go test -race ./utils... | ||
sh ./goclean.sh | ||
go test -v -bench=Bench -benchmem -run='Bench' ./mails | ||
go test -v -bench=Bench -benchmem -run='Bench' ./utils | ||
sh ./build-base.sh | ||
sh ./build-min.sh | ||
docker images | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
docker pull alpine:3.9 | ||
docker pull golang:1.12.3-alpine3.9 | ||
docker pull alpine:3.13.5 | ||
docker pull golang:1.16.3-alpine3.13 | ||
docker build -t toomore/mailbox:base ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters