Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
139 lines (128 sloc) 4.16 KB
name: Elm Actions
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 13
uses: actions/setup-node@v1
with:
node-version: 13
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v1
id: elm-cache
with:
path: ~/.elm
key: ${{ runner.os }}-elm--home-${{ hashFiles('**/elm.json') }}
- run: npm ci
- run: npx --no-install elm make --output /dev/null && cd examples && npx --no-install elm make src/*.elm --output /dev/null && cd ..
- name: elm-test
run: npx --no-install elm-test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 13
uses: actions/setup-node@v1
with:
node-version: 13
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v1
id: elm-cache
with:
path: ~/.elm
key: ${{ runner.os }}-elm--home-${{ hashFiles('**/elm.json') }}
- run: npm ci
- run: npx --no-install elm make --output /dev/null && cd examples && npx --no-install elm make src/*.elm --output /dev/null && cd ..
- name: elm-format
run: npx --no-install elm-format --validate
approve-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 13
uses: actions/setup-node@v1
with:
node-version: 13
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v1
id: elm-cache
with:
path: ~/.elm
key: ${{ runner.os }}-elm--home-${{ hashFiles('**/elm.json') }}
- run: npm ci
- run: npx --no-install elm make --output /dev/null && cd examples && npx --no-install elm make src/*.elm --output /dev/null && cd ..
- name: Check examples
run: ./approve.sh
validate-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 13
uses: actions/setup-node@v1
with:
node-version: 13
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v1
id: elm-cache
with:
path: ~/.elm
key: ${{ runner.os }}-elm--home-${{ hashFiles('**/elm.json') }}
- run: npm ci
- run: npx --no-install elm make --output /dev/null && cd examples && npx --no-install elm make src/*.elm --output /dev/null && cd ..
- name: Build elm docs
run: ./node_modules/.bin/elm make --docs docs.json
publish-elm-package:
needs: [test, lint, validate-package]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 13
uses: actions/setup-node@v1
with:
node-version: 13
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v1
id: elm-cache
with:
path: ~/.elm
key: ${{ runner.os }}-elm--home-${{ hashFiles('**/elm.json') }}
- run: npm ci
- run: npx --no-install elm make --output /dev/null && cd examples && npx --no-install elm make src/*.elm --output /dev/null && cd ..
- name: Elm Publish
uses: dillonkearns/elm-publish-action@1.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-elm: ./node_modules/.bin/elm
You can’t perform that action at this time.