Skip to content

Commit 481e94d

Browse files
committed
Use default working-directory in workflow
1 parent f3b1ecc commit 481e94d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/rails_mysql_ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ env:
1111
rails_app_root: rails_mysql
1212
DB_HOST: mysql
1313

14+
defaults:
15+
run:
16+
working-directory: rails_mysql
17+
1418
jobs:
1519
scan_ruby:
1620
runs-on: ubuntu-latest
@@ -27,7 +31,6 @@ jobs:
2731

2832
- name: Scan for common Rails security vulnerabilities using static analysis
2933
run: ./bin/brakeman --no-pager
30-
working-directory: ${{ env.rails_app_root }}
3134

3235
lint:
3336
runs-on: ubuntu-latest
@@ -44,7 +47,6 @@ jobs:
4447

4548
- name: Lint code for consistent style
4649
run: ./bin/rubocop -f github
47-
working-directory: ${{ env.rails_app_root }}
4850

4951
rspec:
5052
runs-on: ubuntu-latest
@@ -73,11 +75,9 @@ jobs:
7375
run: |
7476
sleep 3 # Waiting to make sure MySQL is up and running
7577
./bin/rails db:reset
76-
working-directory: ${{ env.rails_app_root }}
7778
7879
- name: Run RSpec
7980
run: ./bin/rspec --format json --out tmp/rspec_results.json --format progress
80-
working-directory: ${{ env.rails_app_root }}
8181

8282
- name: Generate RSpec report
8383
uses: SonicGarden/rspec-report-action@v5

0 commit comments

Comments
 (0)