-
Notifications
You must be signed in to change notification settings - Fork 1
25 lines (25 loc) · 939 Bytes
/
ci.yaml
File metadata and controls
25 lines (25 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: CI
on:
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup
run: |
curl -L -o prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v2.50.0/prometheus-2.50.0.linux-amd64.tar.gz
mkdir -p prometheus
tar -xzvf prometheus.tar.gz -C prometheus --strip-components=1
mv prometheus/promtool /usr/local/bin/promtool
rustup update
rustup component add rustfmt clippy
- name: rustfmt
run: cargo fmt -- --check
- name: clippy
run: cargo clippy --all-targets -- --deny warnings
- name: Test
run: cargo test