Skip to content

Commit

Permalink
run tests in actions and fix readme badges (#18)
Browse files Browse the repository at this point in the history
* start in on ci for gh actions

* move format step into macos-latest

* add checkout repo steps

* fix elm format path

* use npm to install elm instead of action

* npm install global

* bad formatting to check action

* restore formatting for passing actions

* remove tests from windows action, they always fail (with the same seed they succeed on macos). it's enough that things build on windows for now

* add fixed (hopefully) badges

* only run tests on push if it's pushing to the main branch
  • Loading branch information
shnewto authored Nov 11, 2023
1 parent a02bc02 commit d197917
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 3 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

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

jobs:
macos-latest:
runs-on: macos-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: install elm
run: |
npm install -g elm
- name: build
run: |
elm make
- name: build docs
run: |
elm make --docs=docs.json
- name: install elm-format
run: |
npm install -g elm-format
- name: format
run: |
elm-format src --validate
- name: install elm-test
run: |
npm install -g elm-test
- name: test
run: |
elm-test
windows-latest:
runs-on: windows-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: install elm
run: |
npm install -g elm
- name: build
run: |
elm make
# TODO: figure out why this fails and how to make it succeed when it's supposed to :)
# - name: install elm-test
# run: |
# npm install -g elm-test
# - name: test
# run: |
# elm-test

ubuntu-latest:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: install elm
run: |
npm install -g elm
- name: build
run: |
elm make
- name: install elm-test
run: |
npm install -g elm-test
- name: test
run: |
elm-test
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://travis-ci.org/shnewto/pgn.svg?branch=main)](https://travis-ci.org/shnewto/pgn)
[![Elm package](https://shields.cdn.bka.li/elm-package/v/shnewto/pgn)](https://package.elm-lang.org/packages/shnewto/pgn/latest/)
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
![ci status](https://github.com/shnewto/pgn/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/shnewto/pgn/actions)
![latest version](https://reiner-dolp.github.io/elm-badges/shnewto/pgn/version.svg)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

# Pgn
`Pgn` is a library for parsing "Portable Game Notation" (PGN) for standard chess. PGN is a plain text standard for recording chess games. For more information check out [the Wikipedia entry on PGN](https://en.wikipedia.org/wiki/Portable_Game_Notation) or [the PGN spec itself](https://ia802908.us.archive.org/26/items/pgn-standard-1994-03-12/PGN_standard_1994-03-12.txt)
Expand Down

0 comments on commit d197917

Please sign in to comment.