Skip to content

Commit

Permalink
Set up CI action to run tests
Browse files Browse the repository at this point in the history
This adds a test matrix for Go 1.17--1.20.

It also adds a README status badge, *of course.*
  • Loading branch information
hrs committed Jun 7, 2023
1 parent 1265de9 commit d9f9410
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Docsim
name: Release

on:
workflow_dispatch:
Expand All @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check out code into the Go module directory
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go 1.19
- name: Install Go 1.19
uses: actions/setup-go@v4
with:
go-version: 1.19
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests
on: [push, pull_request]
permissions: {}

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go_version:
- "1.17"
- "1.18"
- "1.19"
- "1.20"

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}

- name: Run tests
run: 'make && make test'
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# `docsim`

[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![CI Status](https://github.com/hrs/docsim/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/hrs/docsim/actions/workflows/test.yml)

A simple, fast command-line tool for scoring the similarity of text documents.

``` console
Expand Down

0 comments on commit d9f9410

Please sign in to comment.