Nightly integration test with latest ruby.wasm #798
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly integration test with latest ruby.wasm | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [main] | |
schedule: | |
- cron: "10 16 * * *" | |
jobs: | |
app: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.0 | |
bundler-cache: true | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Set up Chrome | |
uses: browser-actions/[email protected] | |
- name: npm install on npm/ | |
run: | | |
cd npm | |
cat package.json | jq '.dependencies."ruby-3_2-wasm-wasi" |= ">= 2.0.0-2023-02-22-a < 2.0.0"' > package.json.new | |
mv package.json.new package.json | |
npm update | |
- name: setup test-app | |
run: | | |
cd test-app | |
npm update | |
bundle update | |
(cd src && bundle update) | |
- name: get latest ruby.wasm and test | |
run: | | |
cd test-app | |
rm -rf 3_2-wasm32-unknown-wasi-full-js | |
wget https://github.com/maiha/xq.cr/releases/download/v0.3.0/xq | |
chmod u+x xq | |
export RELEASE_DATE=$(curl https://github.com/ruby/ruby.wasm/releases.atom | ./xq .title | tee | head -2 | tail -1 | sed -r 's/^.+>(.+?)<.+$/\1/g') | |
echo $RELEASE_DATE | |
bundle exec rake | |
nohup npm run dev & | |
sleep 15 | |
bundle exec rspec |