diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b5b1870 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,49 @@ +name: Tests +# We have a PR to merge from upstream, which has alrady migrated to GHA +# https://github.com/aptible/acme-client/pull/8 + +on: + pull_request: + branches: + - main + - master + push: + branches: + - main + - master + +jobs: + test: + name: Test Ruby ${{ matrix.RUBY_VERSION }} + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + RUBY_VERSION: ["2.6"] + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.RUBY_VERSION }} + bundler-cache: true + bundler: 1.17.3 + + - name: Run Tests + run: bundle exec rake + + results: + if: ${{ always() }} + runs-on: ubuntu-latest + name: Final Results + needs: [test] + steps: + - run: exit 1 + # see https://stackoverflow.com/a/67532120/4907315 + if: >- + ${{ + contains(needs.*.result, 'failure') + || contains(needs.*.result, 'cancelled') + }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9a3db20..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: ruby -cache: bundler -rvm: - - 2.2 - - 2.6.6