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

[Feature] Get Papers #8

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
118 changes: 118 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
version: 2.1
commands:
setup_environment:
description: "Setup testing environment"
parameters:
cache_key:
type: string
default: algo3-backend-cache
steps:
- run: set -e
- setup_remote_docker
- run:
name: Prepare environment and install dependencies
command: |
export SCCACHE_CACHE_SIZE=200M
export WORK_DIR="$CIRCLE_WORKING_DIRECTORY/.cache/sccache"
export SCCACHE_DIR="$CIRCLE_WORKING_DIRECTORY/.cache/sccache"
mkdir -p "$CIRCLE_WORKING_DIRECTORY/.bin"
wget https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz
tar -C "$CIRCLE_WORKING_DIRECTORY/.bin" -xvf sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz
mv $CIRCLE_WORKING_DIRECTORY/.bin/sccache-0.2.13-x86_64-unknown-linux-musl/sccache $CIRCLE_WORKING_DIRECTORY/.bin/sccache
export PATH="$PATH:$CIRCLE_WORKING_DIRECTORY/.bin"
export RUSTC_WRAPPER="sccache"
rm -rf "$CIRCLE_WORKING_DIRECTORY/.cargo/registry"
sudo apt-get update && sudo apt-get install -y clang llvm-dev llvm pkg-config xz-utils make libssl-dev libssl-dev
- restore_cache:
keys:
- << parameters.cache_key >>

clear_environment:
description: "Clear environment"
parameters:
cache_key:
type: string
default: algo3-backend-cache
steps:
- run: (sccache -s||true)
- run: set +e
- save_cache:
key: << parameters.cache_key >>
paths:
- .cache/sccache
- .cargo

run_parallel:
description: "Build and run tests (in parallel)"
parameters:
workspace_member:
type: string
steps:
- run:
no_output_timeout: 30m
command: |
cd << parameters.workspace_member >>
cargo test -- --list --format terse | sed 's/: test//' > test_names.txt
TEST_NAMES=$(circleci tests split test_names.txt)
for i in $(echo $TEST_NAMES | sed "s/ / /g")
do
RUST_MIN_STACK=8388608 cargo test --workspace $i
done
install_rust_nightly:
description: "Install Rust nightly toolchain"
steps:
- run: rustup toolchain install nightly-x86_64-unknown-linux-gnu

jobs:
tests:
docker:
- image: cimg/rust:1.63.0
resource_class: xlarge
parallelism: 20
steps:
- checkout
- setup_environment:
cache_key: algo3-backend-cache
- run_parallel:
workspace_member: .
- clear_environment:
cache_key: algo3-backend-cache

fmt:
docker:
- image: cimg/rust:1.63.0
resource_class: xlarge
steps:
- checkout
- install_rust_nightly
- setup_environment:
cache_key: algo3-backend-fmt-cache
- run:
name: Check style
no_output_timeout: 35m
command: cargo +nightly fmt --all -- --check
- clear_environment:
cache_key: algo3-backend-fmt-cache

clippy:
docker:
- image: cimg/rust:1.63.0
resource_class: xlarge
steps:
- checkout
- install_rust_nightly
- setup_environment:
cache_key: algo3-backend-clippy-cache
- run:
name: Check style
no_output_timeout: 35m
command: cargo +nightly clippy --workspace --all-targets
- clear_environment:
cache_key: algo3-backend-clippy-cache

workflows:
main-workflow:
jobs:
- tests
- fmt
- clippy
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 👉 [Usá una de estas plantillas de issues](https://github.com/algoritmos-iii/algo3-discord-bot/issues/new/choose) 👈

Nota: para mantener el trabajo pendiente limpio y procesable, los problemas pueden cerrarse de inmediato si no siguen una de las plantillas de problemas anteriores.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: 🐛 Reporte de Bug
about: Enviar un informe de error si algo no funciona
title: "[Bug]"
labels: bug
---

## 🐛 Reporte de Bug

<!--
¿Cuál es el bug que encontraste?
¿Qué tan serio es este bug y qué afecta?
-->

(Escribí una breve descripción acá)

## Pasos para reproducir el bug

<!--
¿Cómo hago para reproducir el bug?
¿Qué mensajes de error aparecen?
-->

1. Paso 1...
2. Paso 2...
3. Paso 3...

## Comportamiento Esperado

<!--
¿Qué comportamiento esperabas que el bot tuviera?
¿Qué pasó en su lugar?
-->

(Escribí lo que esperabas que pase acá)

## Tu entorno

- <!-- Versión del bot -->
- <!-- package.json -->
- <!-- Sistema Operativo -->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: ❓ Algoritmos y Programación 3 - Leveroni
url: https://algoritmos-iii.github.io/#canales-consultas
about: Canales de consulta
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: 📚 Documentación
about: Cree un issue relacionado a documentación
title: "[Docs]"
labels: 'documentation'
---

## 📚 Documentación

<!--
¿Encontraste algún problema en la documentación?
¿Hay documentación que quieras agregar que no haya?
-->

(Escribí tu propuesta acá)
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: 🚀 Feature
about: Enviar una nueva solicitud de feature
title: "[Feature]"
labels: feature
---

## 🚀 Feature

<!--
¿Qué feature te gustaría ver en el backend de la cátedra?
-->

(Escribí una breve descripción acá)

## Motivación

<!--
¿Por qué esta feature debería implementarse?
¿Cómo se usaría esta feature?

¿Está esta feature relacionada con algún problema? Si es así, por favor describa.
Por favor incluye una lista de los PRs o issues relacionados.
-->

(Escribí tu motivación acá)

## Implementación

<!--
¿Cómo implementarías esta feature?
¿Qué componentes del bot se verían afectado (si es que los hay)?
¿Qué cambios tendrías que hacer en el código?
-->
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: 💥 Propuesta
about: Proponer un cambio no trivial en el backend de la cátedra
title: "[Propuesta]"
labels: 'propuesta'
---

## 💥 Propuesta

<!--
¿Cuál es tu propuesta para el backend de la cátedra?
¿Cuáles son las implicaciones de la propuesta?
¿Tu propuesta afecta a algo ya existente en el código?
-->

(Escribí tu propuesta acá)
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Gracias por prerparar un PR! Ayudanos a entender explicando tus cambios. Feliz contribución! -->

## PRs relacionados

<!--
Si este PR agrega funcionalidad, corrige algún error, agrega documentación
o modifica algo que ya existe, puedes agregar una lista de PRs relacionados.
(Se recomienda leer https://docs.github.com/es/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
-->

(Escribí los links a los PRs relacionados acá)

## Motivación

(Escribí tu motivación acá)

## Plan de Tests

<!-- Si cambiaste código, contános cómo verificaste el funcionamiento de dicho cambio. -->

(Escribí tu plan de tests acá)

14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
time: "10:00"
target-branch: "main"
open-pull-requests-limit: 10
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
5 changes: 5 additions & 0 deletions .rusty-hook.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[hooks]
pre-commit = "cargo +nightly clippy && cargo +nightly fmt --all -- --check"

[logging]
verbose = true
Loading