Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

# CI is run on pull requests and on push to the main branch
on:
pull_request:
push:
branches: [ main ]

jobs:
test:
# This job is to run the tests
name: Run tests
runs-on: ubuntu-latest

steps:
# Clone the repository
- uses: actions/checkout@v2

# Setup Node JS
- uses: actions/setup-node@v2
with:
node-version: 16

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-


# Install elm and cache ELM_HOME
- name: Install dependencies
run: npm install

- name: Check formatting
run: npm run test:format

- name: Run the tests
run: npm run test:elm
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"private": true,
"scripts": {
"start": "parcel serve --no-cache examples/index.html",
"test": "cypress run",
"test:elm": "elm-test",
"test:format": "elm-format --validate src tests",
"test:cypress": "cypress run",
"cypress:open": "cypress open"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions src/Task/Extra.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Task.Extra exposing (andMap)

import Task exposing (Task)


andMap : Task x a -> Task x (a -> b) -> Task x b
andMap =
Task.map2 (|>)
2 changes: 1 addition & 1 deletion tests/AlignmentTest.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module AlignmentTest exposing (suite)

import Browser.Dom as Dom exposing (Element)
import Expect
import Html.Attributes as Attrs
import Html.Styled.Attributes as Attrs
import SmartSelect.Alignment as Alignment
import Test exposing (Test, describe, test)

Expand Down