Skip to content

EthereumRemix/sol-test

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Action For Running Solidity Unit Tests

npm version npm npm GitHub contributions welcome

This GitHub action enables you to run Solidity Unit Tests as part of your continuous integration and deployment process. To know more about Remix IDE Solidity Unit Testing, visit Remix IDE official documentation, Remix Tests Library.

Example workflow: Sample

name: solidity-unit-testing-action
on: [push]

jobs:
  run_sample_test_job:
    runs-on: ubuntu-latest
    name: A job to run sample solidity tests
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Environment Setup
        uses: actions/setup-node@v3
        with:
          node-version: 14.17.6
      - name: Run SUT action with default provider
        uses: EthereumRemix/sol-test@v1.2
        with:
          test-path: 'sample/tests/Ballot_test.sol'
          compiler-version: '0.8.15'
      - name: Run SUT Action with custom fork
        uses: EthereumRemix/sol-test@v1.2
        with:
          test-path: 'sample/tests/custom/hardFork_test.sol'
          compiler-version: '0.8.17'
          hard-fork: 'merge'
          node-url: 'https://mainnet.infura.io/v3/08b2a484451e4635a28b3d8234f24332'

License

MIT © 2018-22 Remix Team