Update Axios #3118
Workflow file for this run
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 workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: Test | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.1 | |
- name: Bundle install | |
run: | | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Read Node.js version to install from `.nvmrc` | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
id: nvm | |
- name: Install required Node.js version | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: Get Yarn cache directory path | |
id: yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Setup cache key and directory for node_modules cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Yarn install | |
run: yarn --frozen-lockfile | |
- name: Yarn build | |
run: cd public/creators-landing && yarn install && yarn build | |
env: | |
process.env.CI : false | |
- name: NewUI install | |
run: cd nextjs && npm install | |
env: | |
process.env.CI: false | |
- name: NewUI build | |
run: cd nextjs && node scripts/copyLeoIcons.js && npm run build | |
env: | |
process.env.CI: false | |
- name: Prepare database | |
run: PREPARING_DATABASE=1 RAILS_ENV=test bundle exec rails db:prepare | |
env: | |
DATABASE_URL_TEST: postgres://postgres:postgres@localhost:5432/brave_publishers_test | |
- name: Run tests | |
run: USE_MINITEST_RETRY=1 NODE_OPTIONS=--openssl-legacy-provider RAILS_ENV=test ./bin/run_tests.sh | |
env: | |
DATABASE_URL_TEST: postgres://postgres:postgres@localhost:5432/brave_publishers_test | |
BAT_RATIOS_URL: https://ratios.rewards.bravesoftware.com | |