Skip to content

Commit

Permalink
ci: some fixes in caching and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kareemmahlees committed Feb 23, 2024
1 parent 118ce60 commit fd07968
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
name: Test and coverage

on: [push, pull_request]
on:
push:
branches:
- master
- main
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql
ports:
- 33061:3306
env:
MYSQL_ROOT_PASSWORD: kareem
MYSQL_DATABASE: mysqlmeta
MYSQL_USER: kareem
MYSQL_PASSWORD: password123
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.21"
cache: true
cache-dependency-path: "**/go.sum"
go-version-file: "./go.mod"
- name: Run coverage
run: go test ./... -race -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage to Codecov
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- master
- main
pull_request:
workflow_dispatch:

permissions:
contents: read
Expand Down

0 comments on commit fd07968

Please sign in to comment.