Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lesomnus committed Jul 15, 2023
1 parent 47de7a4 commit 2ca0248
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: docker/setup-buildx-action@v2

- name: Login GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/lesomnus/vcpkg-cache-http:edge
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test

on:
pull_request:
paths:
- "**/*.go"
push:
paths:
- "**/*.go"

jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: go.mod

- run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...

- uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage.txt

0 comments on commit 2ca0248

Please sign in to comment.