Skip to content

Compile and test solutions to LeetCode problems on GitHub Actions

License

Notifications You must be signed in to change notification settings

threeal/leettest-action

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

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-24.04
    steps:
      - name: Checkout Project
        uses: actions/checkout@v4.2.0

      - name: Test Solutions
        uses: threeal/leettest-action@v0.2.0

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/leettest-action@v0.2.0
  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

About

Compile and test solutions to LeetCode problems on GitHub Actions

Resources

License

Stars

Watchers

Forks