Skip to content
check-circle

GitHub Action

Solidity Unit Tests Action

v1.2 Latest version

Solidity Unit Tests Action

check-circle

Solidity Unit Tests Action

Runs unit testing on solidity contracts

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Solidity Unit Tests Action

uses: EthereumRemix/sol-test@v1.2

Learn more about this action in EthereumRemix/sol-test

Choose a version

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