Skip to content
zap

GitHub Action

LeetTest Action

v0.2.0 Latest version

LeetTest Action

zap

LeetTest Action

Compile and test solutions to LeetCode problems

Installation

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

              

- name: LeetTest Action

uses: threeal/[email protected]

Learn more about this action in threeal/leettest-action

Choose a version

LeetTest Action

Compile and test solutions to LeetCode problems on GitHub Actions.

Available Inputs

Name Type Description
files Multiple strings A list of pattern for solution files to process. It defaults to **/solution.cpp.

Example Usages

This example demonstrates how to use this action to compile and test solutions to LeetCode problems in a GitHub Actions workflow:

name: Test
on:
  push:
jobs:
  test-solutions:
    name: Test Solutions
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/[email protected]

      - name: Test Solutions
        uses: threeal/[email protected]

Testing Specific Solution Files

By default, this action tests all solution files in the current working directory. To specify the solution files to test, set the files input:

- name: Test Solutions
  uses: threeal/[email protected]
  with:
    files: |
      problems/2235/solution.cpp
      other-problems/**/solution.cpp

License

This project is licensed under the terms of the MIT License.

Copyright © 2024 Alfi Maulana