Skip to content

Commit

Permalink
ci: add workflow to run automated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rodionlim committed Jan 27, 2025
1 parent ba43ab5 commit fd523a4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

env:
SWAG_VERSION: v1.16.4
GO_VERSION: 1.23.4

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod download

- name: Install swag
run: go install github.com/swaggo/swag/cmd/swag@${{ env.SWAG_VERSION }}

- name: Build
run: make build

- name: Run tests
run: make test
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Portfolio Valuation Tool

[![CI](https://github.com/rodionlim/portfolio-manager-go/actions/workflows/ci.yml/badge.svg)](https://github.com/rodionlim/portfolio-manager-go/actions/workflows/ci.yml)

An application to value equities, fx, commodities, cash, bonds (corps / gov), and cryptocurrencies in your personal portfolio.

## Features
Expand Down

0 comments on commit fd523a4

Please sign in to comment.