Skip to content

Commit

Permalink
chore: add some ci
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed Aug 5, 2024
1 parent a9ee309 commit f1f5e59
Show file tree
Hide file tree
Showing 9 changed files with 402 additions and 158 deletions.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/general-purpose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Your issue may already be reported! Please search on the
[issue tracker][issue-tracker] before creating one.

## Expected behavior

<!--- If you're describing a bug, tell us what should happen -->

<!--- If you're suggesting a change/improvement, tell us how it should work -->

## Current behavior

<!--- If describing a bug, tell us what happens instead of the expected
behavior -->

<!--- If suggesting a change/improvement, explain the difference from current
behavior -->

## Possible solution

<!--- Not obligatory, but suggest a fix/reason for the bug, -->

<!--- or ideas how to implement the addition or change -->

## Context

<!--- How has this issue affected you? What are you trying to accomplish? -->

<!--- Providing context helps us come up with a solution that is most useful in
the real world -->

## Steps to reproduce (FOR BUGS)

<!--- Provide a link to a live example, or an unambiguous set of steps to -->

<!--- reproduce this bug. Include code to reproduce, if relevant -->

1.

## Your environment (FOR BUGS)

<!--- Include as many relevant details about the environment you experienced the
bug in -->

- Version used:
- Browser Name and version:
- Operating System and version (desktop or mobile):
- Link to your project:

[issue-tracker]: https://github.com/elixir-cloud-aai/ga4gh-sdk/issues
60 changes: 0 additions & 60 deletions .github/workflows/ci.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/code_quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: Code test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
component: fmt

- name: Run fmt checks
run: |
cargo fmt -- ./lib/src/serviceinfo/models/*.rs
cargo fmt -- ./lib/src/tes/models/*.rs
cargo fmt -- --check
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
component: clippy

- name: Run unit tests
run: |
cargo clippy -- -D warnings
spell-check:
name: Spell check
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.9.0'

- name: Install cspell
run: npm install -g cspell

- name: Spell check
run: cspell "**/*"
...
70 changes: 70 additions & 0 deletions .github/workflows/code_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: Code test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
integration-tests:
name: Run integration tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run integration tests
run: cargo test --tests

- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Run unit tests with coverage
run: cargo tarpaulin --tests --out Xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tarpaulin-report.xml
flags: test_integration
name: codecov-umbrella
fail_ci_if_error: true
verbose: true

unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run unit tests
run: cargo test --lib

- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Run unit tests with coverage
run: cargo tarpaulin --tests --out Xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tarpaulin-report.xml
flags: test_unit
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
...
98 changes: 0 additions & 98 deletions .github/workflows/local.yml

This file was deleted.

Loading

0 comments on commit f1f5e59

Please sign in to comment.