From ce080af33b16513771746e4de455460de2c1018f Mon Sep 17 00:00:00 2001 From: Romans Potasovs Date: Wed, 22 Jan 2020 16:55:12 +0200 Subject: [PATCH] Migration to GitHub Actions --- .github/workflows/build.yml | 48 +++++++++++++++++++++++++++++++++++++ .travis.yml | 12 ---------- tests/Layer.elm | 2 +- 3 files changed, 49 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..21c7ac1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,48 @@ +name: Build + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Checkout submodules + shell: bash + run: git submodule update --init --recursive + + - name: Setup Elm + uses: justgook/setup-elm@v1 + + - name: Setup Node.js for use with actions + uses: actions/setup-node@v1.1.0 + with: + node-version: 12.x + + - name: Set yarn + id: yarn + run: | + echo "::set-output name=dir::$(yarn cache dir)" + echo "::add-path::$(yarn bin)" + echo "::add-path::$(yarn global bin)" + + - name: Get Yarn cache + uses: actions/cache@v1.0.3 + id: yarn-cache-exists + with: + path: ${{ steps.yarn.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install elm-test + run: yarn global add elm-test@0.19.1-revision2 + + - name: Test + env: + ELM_HOME: ${{ steps.elm-home.outputs.dir }} + run: elm-test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b29348d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: required - -language: elm -node_js: '10' # latest 10.x - -elm-test: 0.19.0-rev6 -elm-format: 0.8.1 - -cache: - yarn: true - directories: - - node_modules diff --git a/tests/Layer.elm b/tests/Layer.elm index be89c7e..e57cd2c 100644 --- a/tests/Layer.elm +++ b/tests/Layer.elm @@ -14,6 +14,6 @@ suite = \obj -> obj |> encode - |> Json.Decode.decodeValue decode + |> Json.Decode.decodeValue (decode False) |> Expect.equal (Ok obj) ]