From a5463cd4d95a482da00a6618fde793d1a7da511e Mon Sep 17 00:00:00 2001 From: Sky Rose Date: Wed, 10 Nov 2021 19:51:41 -0500 Subject: [PATCH 1/4] add github actions ci --- .github/workflows/test.yml | 16 ++++++++++++++++ README.md | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0dac528 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,16 @@ +name: "Tests" + +on: [push, pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14' + cache: 'npm' + - run: npm ci + - run: npx elm-tooling install + - run: npm test diff --git a/README.md b/README.md index 7a3090f..93d7d21 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Maybe.Extra +[![Build Status](https://github.com/elm-community/maybe-extra/workflows/test/badge.svg)](https://github.com/elm-community/maybe-extra/actions) + Convenience functions for working with Maybe ## Contributing From 55957d82301c471876e0b8f94c89e50ef8f7caa1 Mon Sep 17 00:00:00 2001 From: Sky Rose Date: Wed, 10 Nov 2021 19:53:56 -0500 Subject: [PATCH 2/4] fixup: remove duplicate elm-tooling call from ci it's already called by npm ci, which runs postinstall --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0dac528..2f091cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,5 +12,4 @@ jobs: node-version: '14' cache: 'npm' - run: npm ci - - run: npx elm-tooling install - run: npm test From 24564507b8ebee2561ad83716970194070412325 Mon Sep 17 00:00:00 2001 From: Sky Rose Date: Wed, 10 Nov 2021 20:07:28 -0500 Subject: [PATCH 3/4] cache ~/.elm --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f091cc..5710340 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,5 +11,9 @@ jobs: with: node-version: '14' cache: 'npm' + - uses: actions/cache@v2 + with: + path: ~/.elm + key: ${{ runner.os }}-elm-${{ hashFiles('package-lock.json', 'elm-tooling.json', 'elm.json') }} - run: npm ci - run: npm test From 052dfe35f0b3b636dd9ebd2fe8ad60faecf6820c Mon Sep 17 00:00:00 2001 From: Sky Rose Date: Wed, 10 Nov 2021 20:20:57 -0500 Subject: [PATCH 4/4] fix badge url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 93d7d21..af98c42 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Maybe.Extra -[![Build Status](https://github.com/elm-community/maybe-extra/workflows/test/badge.svg)](https://github.com/elm-community/maybe-extra/actions) +[![Build Status](https://github.com/elm-community/maybe-extra/workflows/test.yml/badge.svg)](https://github.com/elm-community/maybe-extra/actions) Convenience functions for working with Maybe