From 974e246358b20b9b3143d256e24f488f0ea6c128 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Tue, 22 Dec 2020 11:04:19 +0100 Subject: [PATCH] Switch from Travis CI to GitHub Actions --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/release.yml | 24 ++++++++++++++++++++++++ .travis.yml | 28 ---------------------------- 3 files changed, 52 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..6115ea07 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +--- +name: CI +on: + - pull_request + - push + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: + - 2.5 + - 2.6 + - 2.7 + env: + BUNDLE_WITHOUT: release + name: Ruby ${{ matrix.ruby }} + 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 test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..f39a9f97 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release + +on: + create: + ref_type: tag + +jobs: + release: + runs-on: ubuntu-latest + if: github.repository == 'voxpupuli/modulesync' + env: + BUNDLE_WITHOUT: release + 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/.travis.yml b/.travis.yml deleted file mode 100644 index de05e87b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -sudo: false -language: ruby -cache: bundler -dist: focal -script: 'bundle exec rake test' -bundler_args: --without release -rvm: - - 2.5 - - 2.6 - - 2.7 -notifications: - email: false - irc: - on_success: always - on_failure: always - channels: - - "chat.freenode.org#voxpupuli-notifications" -deploy: - provider: rubygems - api_key: - secure: "Tbf1EbLEobIIox+fftJZADZsfQQ6kl0urcMNetK7NJzFo/negD/WyJIUj3kro/B7buyYADEjTui/JR4o8EPbugfM3ie5vYOd5k3AesSzbdr4BSwGe/cGbGOB7/PZuGfFLkb94/FiCU2mIwibkbh1rHWGlBoPj7ntL0+5ZtdvsM4=" - gem: modulesync - on: - rvm: 2.7 - tags: true - all_branches: true - repo: voxpupuli/modulesync