-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test on a range of supported Ruby and JRuby versions for TZInfo v1 and v2, head versions of Ruby and JRuby and the head version of TZInfo. TZInfo v1 supports Ruby 1.8.7. TZInfo v1 and v2 support JRuby 1.7. Neither of these versions are tested due to incompatibilies with old timestamps.
- Loading branch information
Showing
4 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.ruby }} with TZInfo ${{ matrix.tzinfo }}${{ matrix.name_suffix }} | ||
strategy: | ||
matrix: | ||
ruby: ['1.9.3', '3.0', jruby-9.0, jruby-9.3] | ||
tzinfo: [v1, v2] | ||
name_suffix: [''] | ||
experimental: [false] | ||
include: | ||
- ruby: '3.0' | ||
tzinfo: head | ||
name_suffix: ' (experimental)' | ||
experimental: true | ||
- ruby: head | ||
tzinfo: v1 | ||
name_suffix: ' (experimental)' | ||
experimental: true | ||
- ruby: jruby-head | ||
tzinfo: v1 | ||
name_suffix: ' (experimental)' | ||
experimental: true | ||
- ruby: head | ||
tzinfo: v2 | ||
name_suffix: ' (experimental)' | ||
experimental: true | ||
- ruby: jruby-head | ||
tzinfo: v2 | ||
name_suffix: ' (experimental)' | ||
experimental: true | ||
fail-fast: false | ||
runs-on: ubuntu-20.04 | ||
continue-on-error: ${{ matrix.experimental }} | ||
env: | ||
TZINFO_GEM: ${{ matrix.tzinfo }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- if: startsWith(matrix.ruby, 'jruby-9.0') | ||
uses: philr/setup-ruby@legacy-v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- if: ${{ !startsWith(matrix.ruby, 'jruby-9.0') }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- run: ruby --version | ||
- run: gem --version | ||
- run: bundle --version | ||
- id: determine_tzdata_version | ||
name: Determine tzdata version | ||
run: echo "::set-output name=tzdata_version::`ruby -r bundler/setup -r tzinfo/data -e 'puts TZInfo::Data::Version::TZDATA'`" | ||
- id: determine_os_version | ||
name: Determine OS version | ||
run: | | ||
echo "::set-output name=os::`lsb_release -si`" | ||
echo "::set-output name=os_version::`lsb_release -sr`" | ||
- name: Cache tzdb | ||
uses: actions/cache@v2 | ||
with: | ||
path: tzdb | ||
key: tzdb-${{ steps.determine_os_version.outputs.os }}-${{ steps.determine_os_version.outputs.os_version }}-${{ steps.determine_tzdata_version.outputs.tzdata_version }} | ||
restore-keys: | | ||
tzdb-${{ steps.determine_os_version.outputs.os }}-${{ steps.determine_os_version.outputs.os_version }}- | ||
- run: bundle exec rake test | ||
env: | ||
TESTOPTS: --verbose | ||
- run: bundle exec rake tzdb:clean:other |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters