Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hunchr committed Jan 26, 2024
1 parent 01ca9e7 commit 632e79e
Showing 1 changed file with 24 additions and 27 deletions.
51 changes: 24 additions & 27 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,51 @@ name: validation
on: push

jobs:
test_ruby:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Redmine
uses: actions/checkout@v4
with:
repository: redmine/redmine
path: redmine
ref: 5.1-stable

- name: Checkout Tracky
uses: actions/checkout@v4
with:
repository: renuo/redmine_tracky
path: redmine/plugins/redmine_tracky
path: plugins/redmine_tracky

- name: Cache gems
uses: actions/cache@v3
with:
path: vendor/bundle
key: npm-${{ hashFiles('Gemfile', 'plugins/redmine_tracky/PluginGemfile.lock') }}

- name: Cache Node modules
uses: actions/cache@v3
with:
path: plugins/redmine_tracky/assets.src/node_modules
key: npm-${{ hashFiles('plugins/redmine_tracky/assets.src/package-lock.json') }}

- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.2'

- name: Start MySQL and update gems
run: gem update --system && sudo service mysql start
- name: Start MySQL
run: sudo service mysql start

- name: Setup Tracky
run: cd redmine/plugins/redmine_tracky && ./bin/setup
working-directory: plugins/redmine_tracky
run: bin/setup
env:
GITHUB_ACTIONS: true

- name: Lint
run: cd redmine/plugins/redmine_tracky && rake lint_ruby
- name: Run linters
working-directory: plugins/redmine_tracky
run: rake lint_ruby

- name: Run tests
run: cd redmine && rake test TEST=plugins/redmine_tracky

check_javascript:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v4
with:
node-version: latest

- name: Install node modules
working-directory: ./assets.src
run: npm install

- name: Lint
run: rake lint_javascript
working-directory: plugins/redmine_tracky
run: rake test

0 comments on commit 632e79e

Please # to comment.