mirror of
https://github.com/samsonjs/csc360-a1-shell.git
synced 2026-03-25 08:45:52 +00:00
Simplify GitHub Actions workflow
This commit is contained in:
parent
0e19e57734
commit
c6f33411f9
2 changed files with 10 additions and 15 deletions
18
.github/workflows/test.yml
vendored
18
.github/workflows/test.yml
vendored
|
|
@ -9,25 +9,13 @@ on:
|
|||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ruby
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
env:
|
||||
BUNDLE_GEMFILE: ruby/Gemfile
|
||||
with:
|
||||
ruby-version: 4.0.0
|
||||
bundler-cache: true
|
||||
- name: Bootstrap
|
||||
run: make bootstrap
|
||||
- name: Run tests
|
||||
run: bundle exec rake test
|
||||
- name: Run standard
|
||||
run: bundle exec rake standard
|
||||
- name: Install C dependencies
|
||||
working-directory: .
|
||||
run: sudo apt-get update && sudo apt-get install -y libreadline-dev
|
||||
- name: Run C tests
|
||||
working-directory: .
|
||||
run: make c
|
||||
run: make
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -1,6 +1,13 @@
|
|||
default: c ruby
|
||||
|
||||
bootstrap:
|
||||
@if command -v apt-get >/dev/null 2>&1; then \
|
||||
sudo apt-get update && sudo apt-get install -y libreadline-dev; \
|
||||
elif command -v brew >/dev/null 2>&1; then \
|
||||
brew list readline >/dev/null 2>&1 || brew install readline; \
|
||||
else \
|
||||
echo "Please install readline (e.g. libreadline-dev or Homebrew readline)."; \
|
||||
fi
|
||||
cd ruby && bundle install --jobs 8
|
||||
|
||||
c:
|
||||
|
|
|
|||
Loading…
Reference in a new issue