-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create rust.yml for Rust installation
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check if Cargo.toml exists | ||
id: check-cargo | ||
run: | | ||
if [ -f Cargo.toml ]; then | ||
echo "Cargo.toml exists. Skipping initialization." | ||
echo "project_initialized=true" >> $GITHUB_ENV | ||
else | ||
echo "Cargo.toml does not exist. Need to initialize the project." | ||
echo "project_initialized=false" >> $GITHUB_ENV | ||
fi | ||
- name: Initialize Rust project | ||
if: env.project_initialized == 'false' | ||
run: | | ||
cargo init --vcs none . | ||
git add . | ||
git config --global user.name 'Quartinal' | ||
git config --global user.email '[email protected]' | ||
git commit -m "Initial commit with cargo init" | ||
git push | ||
- name: Install Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Build | ||
run: cargo build --verbose | ||
|
||
- name: Run tests | ||
run: cargo test --verbose |
3bdf73c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
commander – ./
commanderproxy.vercel.app
commander-git-main-command-enterprises.vercel.app
commander.iamadeveloper.dev
commander-command-enterprises.vercel.app