mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-07-26 06:59:28 +02:00
parent
f594fc2ffc
commit
67f7266ef9
38
.github/workflows/rust.yml
vendored
Normal file
38
.github/workflows/rust.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: Rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
profile: minimal
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
- uses: actions-rs/cargo@v1.0.1
|
||||||
|
name: Check format
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --all -- --check
|
||||||
|
- uses: actions-rs/cargo@v1.0.1
|
||||||
|
name: Run clippy
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --all-targets --locked -- -D warnings
|
||||||
|
- uses: actions-rs/cargo@v1.0.1
|
||||||
|
name: Run tests
|
||||||
|
with:
|
||||||
|
command: test
|
@ -1,37 +0,0 @@
|
|||||||
stages:
|
|
||||||
- stage: Check
|
|
||||||
jobs:
|
|
||||||
- job: Check
|
|
||||||
displayName: Sanity Check
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-16.04'
|
|
||||||
container: 'rust:latest'
|
|
||||||
steps:
|
|
||||||
- script: rustup component add clippy rustfmt
|
|
||||||
displayName: Install clippy and rustfmt
|
|
||||||
- script: cargo fmt -- --check
|
|
||||||
displayName: Check Formatting
|
|
||||||
- script: cargo check --all
|
|
||||||
displayName: Check
|
|
||||||
- script: cargo clippy
|
|
||||||
displayName: Clippy
|
|
||||||
|
|
||||||
- stage: Build
|
|
||||||
jobs:
|
|
||||||
- job: BuildDocker
|
|
||||||
displayName: Build Docker Image
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-16.04'
|
|
||||||
steps:
|
|
||||||
- task: Docker@2
|
|
||||||
displayName: Login to Dockerhub
|
|
||||||
inputs:
|
|
||||||
command: login
|
|
||||||
containerRegistry: Dockerhub
|
|
||||||
- task: Docker@2
|
|
||||||
displayName: Build and Push
|
|
||||||
inputs:
|
|
||||||
command: buildAndPush
|
|
||||||
repository: darwish/alma
|
|
||||||
tags: |
|
|
||||||
latest
|
|
Loading…
x
Reference in New Issue
Block a user