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

Add GitHub Actions CI #29

Merged
merged 2 commits into from
Apr 29, 2022
Merged
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
71 changes: 71 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: Test

on:
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
pull_request:
push:
branches:
- development
# Run weekly on the default branch to make sure it always builds with the latest rust release
schedule:
- cron: '30 5 * * 1'

jobs:
lint:
# It is possible for lints to break after merge (e.g., new clippy checks), but it's not worth
# breaking the build if that happens. So we'll skip this job for scheduled runs.
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Format check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

- name: Lint
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings

test-matrix:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repo
uses: actions/checkout@master

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal

- name: Test
uses: actions-rs/cargo@v1
with:
command: test

# This job reports the results of the test matrix above
test:
if: always()
needs: test-matrix
runs-on: ubuntu-latest
steps:
- if: needs.test-matrix.result != 'success'
name: Fail the build
run: exit 1
2 changes: 1 addition & 1 deletion src/types/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ pub struct GroupMember {

#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Debug, Serialize, Deserialize)]
pub struct ListGroupMembersResponse {
pub members: Vec<GroupMember>
pub members: Vec<GroupMember>,
}
2 changes: 1 addition & 1 deletion src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

pub mod auth;
pub mod common;
pub mod group;
pub mod job;
pub mod package;
pub mod project;
pub mod user_settings;
pub mod group;
2 changes: 1 addition & 1 deletion src/types/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub struct ProjectDetailsResponse {
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Debug, Serialize, Deserialize)]
pub struct CreateProjectRequest {
pub name: String,
pub group_name: Option<String>
pub group_name: Option<String>,
}

pub type UpdateProjectRequest = CreateProjectRequest;
Expand Down