From b9733ce886dfe2775780967063b765912d4c9a59 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 8 Dec 2020 18:00:45 +0100 Subject: [PATCH] Convert from Travis to Github Actions --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ .travis.yml | 23 ----------------------- 3 files changed, 51 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dfc26f9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release + +on: + create: + ref_type: tag + +jobs: + release: + runs-on: ubuntu-latest + if: github.repository == 'voxpupuli/voxpupuli-test' + steps: + - uses: actions/checkout@v2 + - name: Install Ruby 2.7 + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7' + - name: Build gem + run: gem build *.gemspec + - name: Publish gem + run: gem push *.gem + env: + GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6ed8149 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test + +on: + - pull_request + - push + +env: + BUNDLE_WITHOUT: release + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: + - "2.4" + - "2.5" + - "2.6" + - "2.7" + steps: + - uses: actions/checkout@v2 + - name: Install Ruby ${{ matrix.ruby }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run tests + run: bundle exec rake spec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f05db97..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -dist: bionic -sudo: false -language: ruby -rvm: - - '2.7' -deploy: - provider: rubygems - api_key: - secure: "qGOWCfn8zhZcCkRMdCVInya9/G9z7U8YksvxWr2HWjypFtgQ52nrhaHWVxvwSTJrM4pmACuhLeWxAkjI8jdBCpjBtDN4Iy2eIm1SqXM3W1AXVYjz+gNWirQh9dzfxvGmmsbKFNJU/jkyLqUijwbcP6ZNKecyBgoS1L73UnEvKlCg3KTtkHwWsftNrc8C5O6DOgN9o9kPMmwI++csodaejpHyMEDpw7gETuaiP1WPTBXArVhdZxhdTA6Edvoc9Cobi4KIIsJDNaRhknffbZlQxbMcgHpTLLt4StUWfoCmwcyxNNHcD/+RIQy2nUmn5jReUxywYNqU2xzH0JyrHoejbJNMPtP4ACFqnJaDzdqiEkEctEbhye/lNTEilXK/iDVkECfQe3V2nQ5UnuKsgSyeqWXUxGTnO/+viKi5jTQRIWZLI/ecb48XNdtRWkkWNAerXX8sJMI7Jx6zKw/vhezA2Fjk9g/JjcdxcGf+jB2ndcs+WOq7bCj7MLjdAUnxkD8Bz66KuzWH/xP6Ei1BUa2rg0kFFsRaBDjrE6SIhf1v2mXqXuQE8faxE4qYhHJvQjaGq2YzfasVAvfe5IonbPxEgHEYA3IcG8ToKewYHe7cFfp22Jwd2h6grDqBRdjCX9OS1xFACmULJl1SQw3am9yIGc8o+E3F7F8LqqvPSlE2fK0=" - gem: voxpupuli-test - on: - tags: true - repo: voxpupuli/voxpupuli-test - rvm: '2.7' - -notifications: - email: false - irc: - on_success: always - on_failure: always - channels: - - "chat.freenode.org#voxpupuli-notifications"