Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
- license checking
- basic test structure
- PR checking
- crendential scanning
- few standard documentation items

Signed-off-by: Jérôme Jutteau <[email protected]>
  • Loading branch information
jerome-jutteau committed Oct 19, 2022
0 parents commit 2a5f38d
Show file tree
Hide file tree
Showing 14 changed files with 601 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 1
updates:
- package-ecosystem: "cargo"
directory: "/"
target-branch: "main"
schedule:
interval: "daily"
15 changes: 15 additions & 0 deletions .github/workflows/cred-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Credential Scanner

on:
pull_request:
branches: [ main ]

jobs:
cred-scan:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Scan credentials
uses: outscale-dev/cred-scan@main
with:
scan_path: "./"
72 changes: 72 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: pull-request

on:
pull_request:
branches: [ main ]

permissions:
pull-requests: write
contents: write

jobs:
reuse-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Reuse specification test
run: make reuse-test
format-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Stable Rust with rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Check code format
run: make format-test
cargo-test:
environment: eu-west-2
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Stable Rust with rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Run tests
env:
OSC_ACCESS_KEY: ${{ secrets.OSC_ACCESS_KEY }}
OSC_SECRET_KEY: ${{ secrets.OSC_SECRET_KEY }}
OSC_REGION: ${{ secrets.OSC_REGION }}
run: make cargo-test
integration-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Stable Rust with rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-musl
- name: Run integration tests
run: make integration-test
dependabot-auto-merge:
needs: [reuse-test, cargo-test, integration-test]
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Auto-merge
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
12 changes: 12 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: osc-cost
Upstream-Contact: Outscale support <[email protected]>
Source: https://gitlab.com/outscale/osc-cost/

Files: *.md
Copyright: 2022 Outscale SAS <[email protected]>
License: CC-BY-4.0

Files: version Makefile sdk_version api_version *.rs .git* src/* *.yml *.yaml .patch/*.patch *.patch Cargo.toml Cargo.lock examples/config_example.json int-tests/*
Copyright: 2022 Outscale SAS <[email protected]>
License: BSD-3-Clause
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "osc-cost"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
26 changes: 26 additions & 0 deletions LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) Outscale SAS. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 2a5f38d

Please sign in to comment.