diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml new file mode 100644 index 0000000000..5db51ab0cd --- /dev/null +++ b/.github/workflows/node-ci.yml @@ -0,0 +1,54 @@ +name: Node-CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + node-tests: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + name: Checkout + + - uses: actions/setup-node@v1 + name: Use Node.js ${{ matrix.node-version }} + with: + node-version: ${{ matrix.node-version }} + + - name: Get yarn cache directory + id: yarn-cache-get-dir + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + id: yarn-cache + name: Restore yarn cache + with: + path: ${{ steps.yarn-cache-get-dir.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: 📦 Install dependencies + run: yarn --production=false --frozen-lockfile + + - name: 🔨Build + run: yarn build --verbose + + - name: 💅🏼 Lint + run: | + yarn lint + yarn ci:lint-docs + + - name: E2E tests + run: yarn test:ci --testPathPattern react-server address + + - name: Unit tests + run: yarn test:ci --testPathIgnorePatterns react-server address diff --git a/.github/workflows/ruby-ci.yml b/.github/workflows/ruby-ci.yml new file mode 100644 index 0000000000..8765aced86 --- /dev/null +++ b/.github/workflows/ruby-ci.yml @@ -0,0 +1,35 @@ +name: Ruby-CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + ruby-tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + name: Checkout + + - uses: ruby/setup-ruby@v1 + name: Use Ruby 2.6 + with: + ruby-version: 2.6 + bundler-cache: true + + - name: 📦 Install dependencies + run: | + bundle config set ignore_messages true + bundle install --frozen + working-directory: ./gems/quilt_rails + + - name: 💅🏼 Lint + run: bundle exec rubocop --fail-fast + working-directory: ./gems/quilt_rails + + - name: Test + run: bundle exec rake test + working-directory: ./gems/quilt_rails diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 90f9748e06..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,54 +0,0 @@ -shared: - node_container: &node_container - language: node_js - node_js: - - 10.16.3 - before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.17.3 - - export PATH="$HOME/.yarn/bin:$PATH" - install: - - yarn install --production=false --frozen-lockfile - cache: yarn - -matrix: - include: - - <<: *node_container - name: 'Node - build, type-check, and end-to-end tests' - script: - - yarn build - - yarn ci:test "(address|react-server)" - cache: - directories: - - .sewing-kit - - .package-build-cache - before-cache: - - ./scripts/copy_build_to_cache.sh - before-script: - - ./scripts/copy_cache_to_build.sh - - <<: *node_container - name: 'Node - unit tests' - script: - - yarn ci:test "^(?:(?!(address|react-server)).)*$" - - <<: *node_container - name: 'Node - lint' - script: - - yarn lint - - yarn ci:lint-docs - - language: ruby - name: 'Gem - test and lint' - before_install: - - gem install bundler -v 2.0.2 - - cd gems/quilt_rails - - bundle config path /tmp/bundle - install: - - bundle install --clean - script: - - bundle exec rake test - - bundle exec rubocop --fail-fast - cache: - directories: - - /tmp/bundle -notifications: - slack: - on_pull_requests: false - secure: 1dRk1kc3vEav6ut7FG5hj8Gowx99B/M4hEXf0b9RDHGEhaWVoDbDGZEqGUn1fdltPLNPmlGp4tM9b00ISu1MMflYkJl3l/8Czp/xGSbzD7FZYACJB2IujHms1xhIijSFkD5+EG3hcwmleWqvySjSQ42z5saaNHlM/mO5kUMIuTgaqqQV2wZC8mN0eZva85Y8HzYIeT0a5DvrTOupUiXKxk8M+y5k9HCuRYTLbgDcdjRR0u0RbGak6PVRFlSEBV4hEjdKS1aQyjXutKWfZxdgWiQbpdC0RmTNTePN0p53pt7oPFHv+BSN7eWzLkeMquIu02r2EEAb9tnYRpChuuFOphguSI5BDYtS1/zOx+VZhkXzoo4nq5iEbh8vYEXI+mj5op9Lz+v38I9j3haCjzjz/PeI7W8/DUIPHhO3t9fqKXqySm/2bx0ZSdSyW8Em63v+8LudkxEcBVLtn1ZPvOCOCfRt+FvzlwJZThzTJ92efxPuFiL5AZoeU4RQGpV/3A7W/wnHt830nNgiUAjMMXhuznF1Fnn4rsGh+Ntr8m18P0DUx+XPflp/r1EfPnkapwSM02tUwF3xunT6i++xg8tuTcVOjWLmq3CBgZ+Q/7g3Ff6Ykcfupqgm5bDgzkQ9bNZM/jAN0cDavzK9i0AELqZkqFcrQclEarL9NgAeCvsl0yk= diff --git a/shipit.gem.yml b/shipit.gem.yml index 8d8df49142..5579ad8f7b 100644 --- a/shipit.gem.yml +++ b/shipit.gem.yml @@ -1,6 +1,6 @@ ci: require: - - continuous-integration/travis-ci/push + - ruby-tests dependencies: override: - echo "nothing to see here" diff --git a/shipit.yml b/shipit.yml index b34901a0b4..5cd81e75f5 100644 --- a/shipit.yml +++ b/shipit.yml @@ -1,6 +1,8 @@ ci: require: - - continuous-integration/travis-ci/push + - node-tests (10.x) + - node-tests (12.x) + - node-tests (14.x) dependencies: post: - yarn run build: {timeout: 1800}