Explicitly install npm (Fix #551) #1064
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
name: Rails | |
on: [push, pull_request] | |
jobs: | |
Rails-Tests: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:9.5 | |
env: | |
POSTGRES_DB: skills_test | |
POSTGRES_USER: skills | |
POSTGRES_PASSWORD: skills | |
ports: ["5432:5432"] | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install Ember-Cli with NPM | |
run: npm install -g [email protected] | |
working-directory: frontend | |
- name: Install dependencies Yarn | |
run: yarn install --frozen-lockfile | |
working-directory: frontend | |
- name: Setup test database | |
env: | |
RAILS_ENV: test | |
PGHOST: localhost | |
POSTGRES_DB: skills_test | |
POSTGRES_USER: skills | |
POSTGRES_PASSWORD: skills | |
run: | | |
bundle exec rake db:create db:migrate | |
- name: Run Tests | |
env: | |
PGHOST: localhost | |
POSTGRES_DB: skills_test | |
POSTGRES_USER: skills | |
POSTGRES_PASSWORD: skills | |
PGPORT: ${{ job.services.postgres.ports[5432] }} | |
run: bundle exec rake | |
- name: Run RuboCop | |
run: bundle exec rubocop --parallel | |
- name: Run Frontend Tests | |
run: bundle exec rake spec:frontend |