String renderer (WIP) #244
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Elm CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- 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: ./node_modules/.bin/elm make --output /dev/null && cd examples && ../node_modules/.bin/elm make src/*.elm --output /dev/null && cd .. && cd spec-tests && ../node_modules/.bin/elm make OutputMarkdownHtml.elm --output /dev/null | |
- run: npm test | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- 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: ./node_modules/.bin/elm make --output /dev/null && cd examples && ../node_modules/.bin/elm make src/*.elm --output /dev/null && cd .. && cd spec-tests && ../node_modules/.bin/elm make OutputMarkdownHtml.elm --output /dev/null | |
- name: elm-format | |
run: npx --no-install elm-format --validate src/ benchmarks/src/ review/src/ examples/src/ tests/ | |
- name: Add elm-review, elm and elm-format to path | |
run: echo "${{ github.workspace }}/node_modules/.bin" >> $GITHUB_PATH | |
- uses: sparksp/elm-review-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
end-to-end: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- 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: ./node_modules/.bin/elm make --output /dev/null && cd examples && ../node_modules/.bin/elm make src/*.elm --output /dev/null && cd .. && cd spec-tests && ../node_modules/.bin/elm make OutputMarkdownHtml.elm --output /dev/null | |
- name: Markdown specs | |
run: npm run test:ete || true | |
- name: Make sure test results are committed | |
run: git diff --exit-code | |
validate-package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- 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: ./node_modules/.bin/elm make --output /dev/null && cd examples && ../node_modules/.bin/elm make src/*.elm --output /dev/null && cd .. && cd spec-tests && ../node_modules/.bin/elm make OutputMarkdownHtml.elm --output /dev/null | |
- 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 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- 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: ./node_modules/.bin/elm make --output /dev/null && cd examples && ../node_modules/.bin/elm make src/*.elm --output /dev/null && cd .. && cd spec-tests && ../node_modules/.bin/elm make OutputMarkdownHtml.elm --output /dev/null | |
- name: Elm Publish | |
uses: dillonkearns/elm-publish-action@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-elm: ./node_modules/.bin/elm |