Skip to content

Commit

Permalink
feat: initial implementation of cargo-ft
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-guillaumed committed Dec 6, 2023
0 parents commit b485958
Show file tree
Hide file tree
Showing 42 changed files with 2,433 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Bug report
about: Use this template to report bugs.
labels: bug, needs triage
---

<!--- Provide a general summary of the issue in the Title above -->

## Description

<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->

## Expected Behavior

<!--- Tell us what should happen -->

## Actual Behavior

<!--- Tell us what happens instead -->

## Possible Fix

<!--- Not obligatory, but suggest a fix or reason for the bug -->

## Steps to Reproduce

<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->

1.
2.
3.
4.

## Context

<!--- How has this bug affected you? What were you trying to accomplish? -->

## Your Environment

<!--- Include as many relevant details about the environment you experienced the bug in -->

* Version used:
* Environment name and version (e.g. cargo 1.74):
* Operating System and version:
* Link to your project:
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/new_feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: New feature
about: Use this template to propose a new feature or a change.
labels: feature, needs triage
---

<!--- Provide a general summary of the issue in the Title above -->

## Detailed Description

<!--- Provide a detailed description of the change or addition you are proposing -->

## Context

<!--- Why is this change important to you? How would you use it? -->
<!--- How can it benefit other users? -->

## Possible Implementation

<!--- Not obligatory, but suggest an idea for implementing addition or change -->
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
34 changes: 34 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] I have updated the documentation if my change requires it.
- [ ] I have added tests to cover my changes.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
fmt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Install cargo-sort
run: cargo install --locked cargo-sort

- name: Check formatting
run: ci/fmt.sh

check:
strategy:
fail-fast: false
matrix:
toolchain: [ stable, "1.74" ] # Check latest stable and MSRV
os: [ ubuntu-latest, windows-latest, macos-latest ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- uses: Swatinem/rust-cache@v2

- name: Check
run: ci/check.sh
shell: bash
20 changes: 20 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint PR

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
title:
runs-on: ubuntu-latest

steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest

permissions:
pull-requests: write
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable

- uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Rust ###
# Generated by Cargo
# will have compiled files and executables
target/
Loading

0 comments on commit b485958

Please sign in to comment.