GithubHelp home page GithubHelp logo

dev-go's Introduction

dev-go's People

Contributors

keinos avatar mergify[bot] avatar

Watchers

 avatar

dev-go's Issues

race option in tests

  1. Set -race option in Go 1.14+'s action @ Dockerfile
    ENTRYPOINT go mod download && go test ./...
- ENTRYPOINT go mod download && go test ./... 
+ ENTRYPOINT go mod download && go test -race ./... 
  1. Remove -race option in CodeCov action.
    run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- go test -race -coverprofile=coverage.out -covermode=atomic ./...
+ go test -coverprofile=coverage.out -covermode=atomic ./...

False-negative on test because of docker-compose up

The below weekly test fails but passes the CI.
https://github.com/KEINOS/dev-go/runs/4575637235?check_suite_focus=true#step:3:120

Cause

Using up command in docker-compose doesn't return 1 on test fail. It will return status 1 only if the container fails to boot.

$ docker-compose up tidy
...
github_tidy_1 exited with code 1
...
$ echo $?
0

Fix

  • docker-compose up -> docker-compose run
      - name: Update go.mod and run tests
        run: |
          set -eu
-           docker-compose --file ./.github/docker-compose.yml up tidy && \
-           docker-compose --file ./.github/docker-compose.yml up v1_14 && \
-           docker-compose --file ./.github/docker-compose.yml up v1_15 && \
-           docker-compose --file ./.github/docker-compose.yml up v1_16 && \
-           docker-compose --file ./.github/docker-compose.yml up v1_17 && \
-           docker-compose --file ./.github/docker-compose.yml up latest
+           docker-compose --file ./.github/docker-compose.yml run tidy && \
+           docker-compose --file ./.github/docker-compose.yml run v1_14 && \
+           docker-compose --file ./.github/docker-compose.yml run v1_15 && \
+           docker-compose --file ./.github/docker-compose.yml run v1_16 && \
+           docker-compose --file ./.github/docker-compose.yml run v1_17 && \
+           docker-compose --file ./.github/docker-compose.yml run latest

actions: Workflow cron mismatches in the comment

All the below runs every week.

# Runs at 16:40 UTC on day-of-month 1 (Every day-of-month 1 at AM 01:40 JST, my time)
- cron: '40 16 * * SUN'

# Runs at 16:30 UTC on day-of-month 1 (Every day-of-month 1 at AM 01:30 JST, my time)
- cron: '30 16 * * SUN'

# Runs at 16:05 UTC on day-of-month 1 (Every day-of-month 1 at AM 01:05 JST, my time)
- cron: '5 16 * * SUN'

actions: redundant test on workflow

go-test.yml workflow runs the same command between Windows and non-Windows platforms. These run steps can be as one.

- name: Run coverage (Windows)
if: runner.os == 'Windows'
run: |
go mod download
go test -v ./...
- name: Run coverage (Linux/macOS)
if: runner.os != 'Windows'
run: |
go mod download
go test -v ./...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.