diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..b0ff7cf5b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + name: Browser tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - uses: actions/setup-node@v2-beta + with: + node-version: 11 + - uses: actions/cache@v2 + with: + path: test/node_modules + key: ${{ runner.os }}-${{ hashFiles('test/yarn.lock') }} + + - run: cd test && yarn install + - run: bin/ci diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 61a7b6bf4..000000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -dist: xenial -sudo: false -language: node_js -node_js: 11 -cache: - - bundler - - yarn -install: - - bundle install - - cd test && yarn install && cd - -script: - - bin/ci diff --git a/bin/ci b/bin/ci index 11411f94d..8f2b55982 100755 --- a/bin/ci +++ b/bin/ci @@ -1,7 +1,16 @@ #!/usr/bin/env bash set -e -if [ "$TRAVIS_REPO_SLUG" == "basecamp/trix" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then +if [ -n "$CI" ]; then + echo "GITHUB_ACTOR: $GITHUB_ACTOR" + echo "GITHUB_EVENT_NAME: $GITHUB_EVENT_NAME" + echo "GITHUB_SHA: $GITHUB_SHA" + echo "GITHUB_REF: $GITHUB_REF" + echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF" + echo "GITHUB_BASE_REF: $GITHUB_BASE_REF" +fi + +if [ -n "$CI" ] && [ "$GITHUB_REF" == "refs/heads/master" ] && [ -z "$GITHUB_HEAD_REF" ]; then $(base64 --decode <<< ZXhwb3J0IFNBVUNFX1VTRVJOQU1FPWJhc2VjYW1wX3RyaXgK) $(base64 --decode <<< ZXhwb3J0IFNBVUNFX0FDQ0VTU19LRVk9MjY3OGE4NzMtNzJmNC00NzU2LTkzYjUtZjFhOGUyZTc3ODIxCg==) else