Skip to content

Commit 2990bcd

Browse files
committed
fix: ✨ fix run tests for workflows
1 parent a7ed97f commit 2990bcd

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/run-tests.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,29 @@ jobs:
2626
uses: actions/checkout@v3
2727

2828
- name: Use Node.js ${{ matrix.node-version }}
29-
uses: actions/setup-node@v2
29+
uses: actions/setup-node@v4
3030
with:
3131
node-version: ${{ matrix.node-version }}
32-
cache: "npm"
32+
cache: 'npm'
3333

3434
- name: Use Ruby 3.3.0
3535
uses: ruby/setup-ruby@v1
3636
with:
3737
ruby-version: 3.3.0
3838
bundler-cache: true
3939

40-
- name: Limpar cache do Bundler
40+
- name: Clean Bundler cache
4141
run: bundle clean --force
4242

4343
- name: Install dependencies
44-
run: bundle install && npm install
44+
run: |
45+
bundle install
46+
npm ci # usa o package-lock.json para evitar problemas de cache
47+
env:
48+
NODE_ENV: test
4549

4650
- name: Run Migrations
47-
run: |
48-
bundle exec ruby ./src/main/config/migrations.rb
51+
run: bundle exec ruby ./src/main/config/migrations.rb
4952
env:
5053
DRIVER: postgres
5154
POSTGRES_DB: ruby-grape-clean-api

0 commit comments

Comments
 (0)