Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🦀 Migrated project to Rust 🦀 #2

Merged
merged 32 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bb5a6ce
migrated codebase to run with rust
Bullrich May 23, 2024
c5fad41
updated gitignore
Bullrich May 23, 2024
73a3fb8
updated name of exported variable
Bullrich May 23, 2024
fe8eb3a
removed unused imports
Bullrich May 23, 2024
7ebda73
Updated readme
Bullrich May 23, 2024
8b97be7
removed unused files
Bullrich May 23, 2024
9570d99
updated docker image
Bullrich May 23, 2024
9a23b0b
added step to test CI
Bullrich May 23, 2024
5e4a2b5
moved image to run in dockerfile
Bullrich May 23, 2024
41b5011
test action on itself
Bullrich May 23, 2024
780c024
removed unused dependency
Bullrich May 23, 2024
cc6ae14
updated docker version
Bullrich May 23, 2024
0b037aa
unified tests into matrix
Bullrich May 23, 2024
70d0e16
fixed version in test action
Bullrich May 23, 2024
91a220b
fixed docker image not compiling
Bullrich May 23, 2024
789a6d5
removed push from test action
Bullrich May 23, 2024
d9d0b90
removed unnecessary step in dockerimage
Bullrich May 23, 2024
87addfb
updated to use context library
Bullrich May 24, 2024
e9276b0
updated library to version 0.0.3
Bullrich May 27, 2024
ffe7d07
updated `actions-github` with `set_output` method
Bullrich May 27, 2024
9f55e47
cleaned code issues
Bullrich May 27, 2024
1bdc9c8
updated lib to 0.0.5
Bullrich May 27, 2024
d319316
updated all tests
Bullrich May 27, 2024
fc0de69
added cargo.lock
Bullrich May 27, 2024
c4fc61e
added actions/cache to github action
Bullrich May 27, 2024
af61e5f
applied code changes
Bullrich May 28, 2024
a3bdb89
removed clone from team
Bullrich May 28, 2024
e8bdcec
updated CI to use crate instead of package
Bullrich May 28, 2024
a8ac16f
updated CI to upload version
Bullrich May 28, 2024
df95400
restored old action version
Bullrich May 28, 2024
e9a1149
updated version to match cargo.toml
Bullrich May 28, 2024
f28f80e
updated test-action to point to main
Bullrich May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Find team members

on:
pull_request:

jobs:
get-team:
runs-on: ubuntu-latest
steps:
- name: Fetch team data
# We add the id to access to this step outputs
id: teams
uses: paritytech/list-team-members@rust/migration
with:
ACCESS_TOKEN: ${{ secrets.READ_ORG_PAT }}
team: opstooling
# optional, in case that it searches on a different organization
organization: paritytech
# example showing how to use the content
- name: Show data
run: |
echo "The users are $USERNAMES"
echo "Data: $DATA"
env:
USERNAMES: ${{ steps.teams.outputs.usernames }}"
# a json object
DATA: ${{ steps.teams.outputs.data }}"
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
pull_request:
push:
branches:
- main

name: Continuous integration

jobs:
test:
name: "Test"
strategy:
fail-fast: true
matrix:
cmd:
- check
- fmt --all -- --check
- clippy -- -D warnings
- doc
- test
- build --release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo ${{ matrix.cmd }}
conclude:
runs-on: ubuntu-latest
name: All tests passed
needs: [test]
steps:
- run: echo '### Good job! All the tests passed 🚀' >> $GITHUB_STEP_SUMMARY
102 changes: 8 additions & 94 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,104 +1,18 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# DynamoDB Local files
.dynamodb/
# These are backup files generated by rustfmt
**/*.rs.bk

# TernJS port file
.tern-port
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
Loading
Loading