From f3dc7160e41f857358fab26d096f1b5f518dad93 Mon Sep 17 00:00:00 2001 From: Ry Dahl Date: Tue, 29 Oct 2019 05:20:01 -0400 Subject: [PATCH] use github actions, remove travis and appveyor (#85) --- .appveyor.yml | 3 --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++ .travis.yml | 43 ---------------------------------------- README.md | 4 +--- install_test.sh | 3 +-- 5 files changed, 33 insertions(+), 51 deletions(-) delete mode 100644 .appveyor.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index bea1bf4..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,3 +0,0 @@ -build: off -test_script: - - ps: .\install_test.ps1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..171adcf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: ci + +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: shfmt + if: matrix.os == 'macOS-latest' + run: | + brew install shfmt + shfmt -d . + + - name: tests shell + if: matrix.os != 'windows-latest' + shell: bash + run: ./install_test.sh + + - name: tests powershell + shell: pwsh + run: ./install_test.ps1 + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 47feb97..0000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -matrix: - include: - - language: sh - os: - - linux - addons: - apt: - packages: - - shellcheck - env: - - SHFMT_VERSION=2.6.2 - - PWSH_VERSION=6.2.3 - - PATH=$HOME/bin/pwsh:$HOME/bin:$PATH - before_script: - - curl -sSL -o $HOME/bin/shfmt https://github.com/mvdan/sh/releases/download/v${SHFMT_VERSION}/shfmt_v${SHFMT_VERSION}_linux_amd64 - - chmod +x $HOME/bin/shfmt - - mkdir -p $HOME/bin/pwsh - - curl -sSL -o $HOME/bin/pwsh/pwsh.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v$PWSH_VERSION/powershell-$PWSH_VERSION-linux-x64.tar.gz - - tar -xf $HOME/bin/pwsh/pwsh.tar.gz -C $HOME/bin/pwsh - - chmod +x $HOME/bin/pwsh/pwsh - script: - - ./install_test.sh - - ./install_test.ps1 - - language: sh - os: - - osx - addons: - homebrew: - update: true - packages: - - shellcheck - - shfmt - env: - - PWSH_VERSION=6.2.3 - - PATH=$HOME/bin/pwsh:$PATH - before_script: - - mkdir -p $HOME/bin/pwsh - - curl -sSL -o $HOME/bin/pwsh/pwsh.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v$PWSH_VERSION/powershell-$PWSH_VERSION-osx-x64.tar.gz - - tar -xf $HOME/bin/pwsh/pwsh.tar.gz -C $HOME/bin/pwsh - - chmod +x $HOME/bin/pwsh/pwsh - script: - - ./install_test.sh - - ./install_test.ps1 diff --git a/README.md b/README.md index 5f3d725..323eadf 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ **One-line commands to install Deno on your system.** -| **Linux & Mac** | **Windows** | -|:---------------:|:-----------:| -| [![Build Status](https://travis-ci.com/denoland/deno_install.svg?branch=master)](https://travis-ci.com/denoland/deno_install) | [![Build status](https://ci.appveyor.com/api/projects/status/gtekeaf7r60xa896?branch=master&svg=true)](https://ci.appveyor.com/project/deno/deno-install) | +[![Build Status](https://github.com/denoland/deno_install/workflows/ci/badge.svg?branch=master)](https://github.com/denoland/deno_install/actions) ## Install Latest Version diff --git a/install_test.sh b/install_test.sh index 76a05d0..be09f53 100755 --- a/install_test.sh +++ b/install_test.sh @@ -3,8 +3,7 @@ set -e # Lint. -shellcheck -s sh ./*.sh -shfmt -d . +# TODO(ry) shellcheck -s sh ./*.sh # Test we can install a specific version. rm -rf ~/.deno