-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,820 additions
and
1,103 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: registry.gitlab.com/easbarba/onur-rust:0.4.0 | ||
|
||
defaults: | ||
run: | ||
working-directory: /home/easbarba/app | ||
|
||
steps: | ||
- name: Integration Tests | ||
|
||
run: | | ||
./prepare.bash | ||
cargo test --verbose |
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,18 @@ | ||
workflow: | ||
rules: | ||
- if: $CI_COMMIT_TAG | ||
when: never | ||
- if: $CI_COMMIT_BRANCH == 'main' | ||
|
||
stages: | ||
- build | ||
- test | ||
|
||
default: | ||
image: registry.gitlab.com/easbarba/onur-rust:$ONUR_VERSION | ||
|
||
Integration Testing: | ||
stage: test | ||
script: | ||
- cargo test | ||
|
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
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
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
[package] | ||
name = "onur" | ||
version = "0.3.0" | ||
version = "0.4.0" | ||
edition = "2021" | ||
description = "Easily manage multiple FLOSS repositories" | ||
authors = ["EAS Barbosa <easbarba@outlook.com>"] | ||
license = "Apache-2.0" | ||
license = "GPL-3 or later" | ||
repository = "https://gitlab.com/easbarba/onur" | ||
|
||
[dependencies] | ||
clap = {version = "4.3.21", features = ["derive"]} | ||
git2 = "0.17.2" | ||
serde = "1.0.183" | ||
serde_derive = "1.0.183" | ||
serde_json = "1.0.104" | ||
clap = {version = "4.5.17", features = ["derive"]} | ||
git2 = "0.19.0" | ||
serde = "1.0.209" | ||
serde_derive = "1.0.209" | ||
serde_json = "1.0.127" |
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 |
---|---|---|
@@ -1,9 +1,35 @@ | ||
FROM rust:1 | ||
WORKDIR /app | ||
# Onur is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Onur is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Onur. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
FROM rust:1.80 | ||
|
||
ENV USERNAME easbarba | ||
ENV APP_HOME /home/$USERNAME/app | ||
WORKDIR $APP_HOME | ||
|
||
RUN groupadd -r $USERNAME && useradd -r -g $USERNAME -d /home/$USERNAME -m -s /bin/bash $USERNAME | ||
RUN chown -R $USERNAME:$USERNAME /home/$USERNAME | ||
|
||
COPY examples examples | ||
COPY ./prepare.bash . | ||
RUN ./prepare.bash | ||
|
||
COPY Cargo.toml Cargo.lock . | ||
RUN mkdir src; echo "fn main() {}" > src/main.rs | ||
RUN cargo build | ||
RUN rm ./src/main.rs | ||
|
||
COPY . . | ||
ENTRYPOINT ["./entrypoint.sh"] | ||
CMD ["cargo", "test"] | ||
RUN cargo build | ||
|
||
CMD [ "cargo", "test" ] |
Oops, something went wrong.