Skip to content

Commit

Permalink
chore: split more step
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Sep 21, 2019
1 parent 6aaf1a1 commit 00daeaa
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,31 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Ruby 2.6.4
run: |
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install -y libsodium-dev
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get install libpq-dev rvm
sudo /usr/share/rvm/bin/rvm install "ruby-2.6.4"
sudo /usr/share/rvm/bin/rvm use 2.6.4
git clone https://github.com/bitcoin-core/secp256k1.git && cd secp256k1 && ./autogen.sh && ./configure && make && ./tests && sudo make install && cd ..
sudo apt install postgresql postgresql-contrib
sudo su - postgres
psql -c 'create database "ckb_explorer_test";' -U postgres
- name: Build and test with Rake
run: |
source /usr/share/rvm/scripts/rvm
gem install bundler:2.0.1
bundle install --jobs 4 --retry 3
bundle exec rails db:create RAILS_ENV=test
bundle exec rails db:migrate RAILS_ENV=test
bundle exec rails test RAILS_ENV=test
- uses: actions/checkout@v1
- name: Set up Ruby 2.6.4
run: |
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install -y libsodium-dev
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get install libpq-dev rvm
sudo /usr/share/rvm/bin/rvm install "ruby-2.6.4"
sudo /usr/share/rvm/bin/rvm use 2.6.4
- name: Set up SECP256k1
run: |
git clone https://github.com/bitcoin-core/secp256k1.git && cd secp256k1 && ./autogen.sh && ./configure && make && ./tests && sudo make install && cd ..
- name: Set up PostgreSQL
run: |
sudo apt install postgresql postgresql-contrib
sudo sed -i 's/peer/trust/gI' /etc/postgresql/10/main/pg_hba.conf
sudo sed -i 's/md5/trust/gI' /etc/postgresql/10/main/pg_hba.conf
sudo systemctl restart postgresql.service
psql -c 'create database "ckb_explorer_test";' -U postgres
- name: Build and test with Rake
run: |
source /usr/share/rvm/scripts/rvm
gem install bundler:2.0.1
bundle install --jobs 4 --retry 3
bundle exec rails db:create RAILS_ENV=test
bundle exec rails db:migrate RAILS_ENV=test
bundle exec rails test RAILS_ENV=test

0 comments on commit 00daeaa

Please sign in to comment.