1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 04:40:09 +01:00

Merge pull request #769 from nschonni/github-actions

chore: Use GitHub Actions for CI
This commit is contained in:
Mike Linksvayer 2020-09-13 14:57:45 -07:00 committed by GitHub
commit de0938179e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 34 deletions

22
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Build and Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
- name: Install dependencies
run: ./script/bootstrap
- name: Run tests
run: ./script/cibuild

View File

@ -1,31 +0,0 @@
#bootstrap and build
before_script: "./script/bootstrap"
script: "./script/cibuild"
#environment
language: ruby
rvm:
- 2.7.1
addons:
apt:
packages:
- libcurl4-openssl-dev
before_install:
- gem update --system
branches:
only:
- gh-pages
- /.*/
notifications:
email: false
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
sudo: false
cache: bundler

View File

@ -1,6 +1,6 @@
**[ChooseALicense.com](https://choosealicense.com)** aims to provide **accurate**, **non-judgmental**, and **understandable** information about popular **open source licenses** in order to **help people make informed decisions** about the projects they start, maintain, contribute to, and use.
[![Build Status](https://travis-ci.org/github/choosealicense.com.svg?branch=gh-pages)](https://travis-ci.org/github/choosealicense.com)
[![](https://github.com/github/choosealicense.com/workflows/test/badge.svg)](https://github.com/github/choosealicense.com/actions?query=workflow%3Atest)
We catalog [select](CONTRIBUTING.md#adding-a-license) open source licenses with a [Jekyll collection](https://jekyllrb.com/docs/collections/) (in `_licenses`). The catalog is used to render [ChooseALicense.com](https://choosealicense.com) and is regularly vendored into [Licensee](https://github.com/licensee/licensee), which GitHub uses to provide a [license chooser and license detection](https://help.github.com/articles/adding-a-license-to-a-repository/), a [licenses API](https://developer.github.com/v3/licenses/), and to [display license descriptions and metadata](https://github.com/blog/2335-open-source-license-descriptions-and-metadata).

View File

@ -9,9 +9,9 @@ describe 'ruby version' do
pages_versions = JSON.parse(open('https://pages.github.com/versions.json').read)
pages_ruby_version = pages_versions['ruby']
ci_config_file = '.travis.yml'
ci_config_file = '.github/workflows/test.yml'
ci_config = YAML.load_file(ci_config_file)
ci_ruby_version = ci_config['rvm'][0]
ci_ruby_version = ci_config['jobs']['test']['steps'][1]['with']['ruby-version']
context "in #{ci_config_file} and pages ruby version" do
it 'match' do