From 841461934d5bc3e7ee8b4b0dfeb5d42a5eb3891c Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 18 Mar 2020 10:50:20 -0700 Subject: [PATCH] Move CI to GitHub Actions --- .github/workflows/ci.yml | 107 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 23 -------- appveyor.yml | 34 ------------ dev-app-update.yml.sample | 5 -- travis.sh | 14 ----- 5 files changed, 107 insertions(+), 76 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100644 dev-app-update.yml.sample delete mode 100755 travis.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..20a091f7e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,107 @@ +name: CI + +on: [push] + +jobs: + macos: + runs-on: macos-latest + + steps: + - run: uname -a + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.13.0' + - run: npm install -g yarn@1.22.0 + + - name: Cache node modules + uses: actions/cache@v1 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*') }} + + - run: yarn install --frozen-lockfile + - run: yarn generate + - run: yarn lint + - run: yarn lint-deps + - run: yarn prepare-beta-build + - run: yarn build + - run: yarn test-node + - run: yarn test-electron + - run: yarn grunt test-release:osx + env: + NODE_ENV: production + + linux: + runs-on: ubuntu-latest + + steps: + - run: uname -a + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.13.0' + - run: sudo apt-get install xvfb + - run: npm install -g yarn@1.22.0 + + - name: Cache node modules + uses: actions/cache@v1 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*') }} + + - run: yarn install --frozen-lockfile + - run: yarn generate + - run: yarn lint + - run: yarn lint-deps + - run: yarn prepare-beta-build + - run: yarn build + - run: xvfb-run --auto-servernum yarn test-node + - run: xvfb-run --auto-servernum yarn test-electron + env: + LANG: en_US + LANGUAGE: en_US + - run: xvfb-run --auto-servernum yarn grunt test-release:linux + env: + NODE_ENV: production + + windows: + runs-on: windows-latest + + steps: + - run: systeminfo + - run: git config --global core.autocrlf false + - run: git config --global core.eol lf + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.13.0' + - run: npm install -g yarn@1.22.0 + + - name: Cache node modules + uses: actions/cache@v1 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*') }} + + - run: yarn install --frozen-lockfile + - run: yarn generate + - run: yarn lint-windows + - run: yarn lint-deps + - run: node build\grunt.js + - run: yarn test-node + - run: copy package.json temp.json + - run: del package.json + - run: type temp.json | findstr /v certificateSubjectName | findstr /v certificateSha1 > package.json + - run: yarn prepare-beta-build + - run: yarn build + - run: node build\grunt.js test + - run: node build\grunt.js test-release:win + env: + SIGNAL_ENV: production diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d590e0231..000000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: - - '12.13.0' -os: - - linux -dist: trusty -before_install: - - npm install -g yarn@1.22.0 -install: - - yarn install --frozen-lockfile -script: - - yarn generate - - yarn lint - - yarn lint-deps - - yarn prepare-beta-build - - yarn build - - ./travis.sh -env: - global: - - SIGNAL_ENV: production -sudo: false -notifications: - email: false diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index c7319102b..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,34 +0,0 @@ -platform: - - x64 - -cache: - - '%LOCALAPPDATA%\electron\Cache' - - node_modules -> package.json - -install: - - systeminfo | findstr /C:"OS" - - set PATH=C:\Ruby23-x64\bin;%PATH% - - ps: Install-Product node 12.13.0 x64 - - npm install -g yarn@1.22.0 - - yarn install --frozen-lockfile - -build_script: - - yarn generate - - yarn lint-windows - - yarn lint-deps - - node build\grunt.js - - yarn test-node - - type package.json | findstr /v certificateSubjectName > temp.json - - move temp.json package.json - - type package.json | findstr /v certificateSha1 > temp.json - - move temp.json package.json - - yarn prepare-beta-build - - yarn build - -test_script: - - node build\grunt.js test - - set NODE_ENV=production - - node build\grunt.js test-release:win - -environment: - SIGNAL_ENV: production diff --git a/dev-app-update.yml.sample b/dev-app-update.yml.sample deleted file mode 100644 index 04af153ba..000000000 --- a/dev-app-update.yml.sample +++ /dev/null @@ -1,5 +0,0 @@ -provider: s3 -region: us-east-1 -bucket: your-test-bucket.signal.org -path: desktop -acl: public-read diff --git a/travis.sh b/travis.sh deleted file mode 100755 index 6b3572fa6..000000000 --- a/travis.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - sleep 3 -fi - -yarn test-node -yarn test-electron - -NODE_ENV=production yarn grunt test-release:$TRAVIS_OS_NAME