Merge pull request #22 from oasisprotocol/rube/issue-11-simplify-pric… #43
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
| # NOTE: This name appears in GitHub's Checks API and in workflow's status badge. | |
| name: ci-test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - stable/* | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| - stable/* | |
| # Cancel in-progress jobs on same branch. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | |
| jobs: | |
| test-contracts: | |
| name: test-contracts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| contracts/node_modules | |
| key: ${{ runner.os }}-bun-${{ hashFiles('contracts/bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install dependencies | |
| working-directory: ./contracts | |
| run: bun install --frozen-lockfile | |
| - name: Compile contracts | |
| working-directory: ./contracts | |
| run: bun hardhat compile | |
| - name: Run tests | |
| working-directory: ./contracts | |
| run: bun hardhat test | |
| test-paymaster-relayer: | |
| name: test-paymaster-relayer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python and uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: '3.12' | |
| enable-cache: true | |
| cache-dependency-glob: "paymaster-relayer/uv.lock" | |
| - name: Install dependencies | |
| working-directory: ./paymaster-relayer | |
| run: uv sync --dev --frozen | |
| - name: Run tests | |
| working-directory: ./paymaster-relayer | |
| run: uv run pytest tests |