From f29e98812ea8744f5e925d7840513e00e7d532d9 Mon Sep 17 00:00:00 2001 From: onee-only Date: Wed, 18 Oct 2023 23:41:52 +0900 Subject: [PATCH] =?UTF-8?q?codecov=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..48b2aa4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: ubuntu-latest + environment: test + env: + CLIENT_ID: ${{ vars.CLIENT_ID }} + CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} + REDIRECT_URI: ${{ vars.REDIRECT_URI }} + EMAIL: ${{ vars.EMAIL }} + PASSWORD: ${{ secrets.PASSWORD }} + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.21" + + - name: Build + run: go build -v ./... + + - name: Test with coverage + run: go test -race -coverprofile=coverage.txt -covermode=atomic + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}