Skip to content

Commit

Permalink
Upgrade node to 16
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrett committed Dec 1, 2023
1 parent b490690 commit e1726bb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 37 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,33 @@ env:

jobs:
tests:
name: Run rspec and javascript tests
name: Run rspec and rubocop

runs-on: ubuntu-latest

services:
postgres:
image: postgres:11.6-alpine
image: postgres:15.4-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ''
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2

- name: Set up Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '14.x'

- name: Set up ruby gem cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
node-version: '16.x'

- name: Install gems
run: |
Expand All @@ -51,30 +43,18 @@ jobs:
- name: Install yarn
run: npm install yarn -g

- name: Yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Set up yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node.js dependencies
run: yarn install

- name: Set up test database
run: bin/rails db:prepare
env:
DATABASE_URL: postgres://postgres:@localhost:5432/test
DATABASE_URL: postgres://postgres:password@localhost:5432/test

- name: Run rubocop
run: bundle exec rubocop

- name: Run tests
run: bundle exec rake
env:
DATABASE_URL: postgres://postgres:@localhost:5432/test
DATABASE_URL: postgres://postgres:password@localhost:5432/test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"engines": {
"node": "14.x"
"node": "16.x"
},
"dependencies": {
"@rails/webpacker": "^5.4.4",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -947,10 +947,10 @@
mkdirp "^1.0.4"
rimraf "^3.0.2"

"@rails/webpacker@^5.4.3":
version "5.4.3"
resolved "https://registry.yarnpkg.com/@rails/webpacker/-/webpacker-5.4.3.tgz#cfe2d8faffe7db5001bad50a1534408b4f2efb2f"
integrity sha512-tEM8tpUtfx6FxKwcuQ9+v6pzgqM5LeAdhT6IJ4Te3BPKFO1xrGrXugqeRuZ+gE8ASDZRTOK6yuQkapOpuX5JdA==
"@rails/webpacker@^5.4.4":
version "5.4.4"
resolved "https://registry.yarnpkg.com/@rails/webpacker/-/webpacker-5.4.4.tgz#971a41b987c096c908ce4088accd57c1a9a7e2f7"
integrity sha512-hp9myb2MChYFPfE5Fd/3gF4q2m4wpxC+WWCkxcg6My3HYCptWuqMVXRwrBZ5EJHYiL/WRyMLvVNWwlFV47xhUw==
dependencies:
"@babel/core" "^7.15.0"
"@babel/plugin-proposal-class-properties" "^7.14.5"
Expand Down Expand Up @@ -3984,10 +3984,10 @@ jest-worker@^26.5.0:
merge-stream "^2.0.0"
supports-color "^7.0.0"

jquery@^3.5.1:
version "3.6.0"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
jquery@^3.7.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==

js-tokens@^4.0.0:
version "4.0.0"
Expand Down

0 comments on commit e1726bb

Please sign in to comment.