-
Notifications
You must be signed in to change notification settings - Fork 31
83 lines (79 loc) · 2.08 KB
/
ci.yml
File metadata and controls
83 lines (79 loc) · 2.08 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Foundry DevTools CI
on:
push:
branches:
- main
paths:
- '**'
- '!docs/**'
- '!LICENSE'
- '!README.md'
- '!.github/**'
- '.github/workflows/ci.yml' # include this workflow
- '!.gitignore'
pull_request:
branches:
- main
paths:
- '**'
- '!docs/**'
- '!LICENSE'
- '!README.md'
- '!.github/**'
- '.github/workflows/ci.yml' # include this workflow
- '!.gitignore'
workflow_dispatch: # Allow manually triggering the workflow
schedule:
# Run roughly every 15 days at 00:00 UTC
# (useful to check if updates on dependencies break the package)
- cron: '0 0 1,16 * *'
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false # always test both versions
matrix:
python:
- "3.10"
- "3.12" # newest Python that is supported by pyspark
steps:
- uses: actions/checkout@v5
with: {fetch-depth: 0} # deep clone for git tag
- uses: pdm-project/setup-pdm@v4
with:
python-version: ${{matrix.python}}
cache: true
- name: Install dependencies
run: pdm install --frozen-lockfile
- name: Run static analysis and format checkers
run: pdm run lint
- name: Run python tests
run: pdm run unit
rust:
runs-on: ubuntu-latest
defaults:
run:
working-directory: libs/oauth-cli
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: libs/oauth-cli
- name: Check formatting
run: cargo fmt --check
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Build
run: cargo build --locked
- name: Run tests
run: cargo test --locked
- name: Audit dependencies
run: cargo install cargo-audit && cargo audit