Spec #2423
This file contains hidden or 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: Spec | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - | |
| cron: "45 3 * * *" | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| ruby: ['3.3', '3.4'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: MacOs Dependencies | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew update | |
| brew tap ethereum/ethereum | |
| brew install --verbose autoconf automake libtool pkg-config autogen geth solidity | |
| - name: Ubuntu Dependencies | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo add-apt-repository -y ppa:ethereum/ethereum | |
| sudo apt-get update | |
| sudo apt-get install -y autoconf automake libtool pkg-config geth solc | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Run Geth | |
| run: | | |
| geth --dev \ | |
| --http \ | |
| --ws \ | |
| --ipcpath /tmp/geth.ipc \ | |
| >/tmp/geth.log 2>&1 & | |
| echo $! > /tmp/geth.pid | |
| sleep 10 | |
| - name: Gem Dependencies | |
| run: | | |
| git submodule update --init --recursive | |
| - name: Run Tests | |
| run: | | |
| bundle exec rspec | |
| - name: Stop Geth | |
| if: always() | |
| run: | | |
| if [ -f /tmp/geth.pid ]; then | |
| kill "$(cat /tmp/geth.pid)" 2>/dev/null || true | |
| fi | |
| - name: Geth Logs (on failure) | |
| if: failure() | |
| run: | | |
| if [ -f /tmp/geth.log ]; then | |
| echo "===== geth log =====" | |
| tail -n 200 /tmp/geth.log | |
| fi | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} |