mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Consolidate CI workflows, fix test
This commit is contained in:
parent
8078425b2d
commit
7bc13ec66b
4 changed files with 24 additions and 60 deletions
23
.github/workflows/build.yaml
vendored
23
.github/workflows/build.yaml
vendored
|
@ -1,23 +0,0 @@
|
||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
profile: minimal
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --locked --verbose
|
|
|
@ -1,11 +1,11 @@
|
||||||
name: Lint
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
ci:
|
||||||
name: Lint
|
name: CI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -22,5 +22,11 @@ jobs:
|
||||||
- name: Rustfmt
|
- name: Rustfmt
|
||||||
run: cargo fmt -- --check
|
run: cargo fmt -- --check
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --locked --verbose
|
||||||
|
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
run: cargo clippy
|
run: cargo clippy
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: cargo test
|
23
.github/workflows/test.yaml
vendored
23
.github/workflows/test.yaml
vendored
|
@ -1,23 +0,0 @@
|
||||||
name: Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
profile: minimal
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: cargo test
|
|
|
@ -53,19 +53,23 @@ for _, key in vars do
|
||||||
print(string.format("[%s] %s", box, key))
|
print(string.format("[%s] %s", box, key))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Call out to another program
|
-- Call out to another program / executable
|
||||||
|
-- NOTE: We don't do this in GitHub Actions and
|
||||||
|
-- our test suite since ping does not work there
|
||||||
|
|
||||||
print("\nSending 4 pings to google...")
|
if process.getEnvVar("GITHUB_ACTIONS") == nil then
|
||||||
local result = process.spawn("ping", {
|
print("\nSending 4 pings to google...")
|
||||||
|
local result = process.spawn("ping", {
|
||||||
"google.com",
|
"google.com",
|
||||||
"-c 4",
|
"-c 4",
|
||||||
})
|
})
|
||||||
|
|
||||||
if result.ok then
|
if result.ok then
|
||||||
print(result.stdout)
|
print(result.stdout)
|
||||||
else
|
else
|
||||||
print(result.stderr)
|
print(result.stderr)
|
||||||
process.exit(result.code)
|
process.exit(result.code)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
print("\nGoodbye, lune! 🌙")
|
print("\nGoodbye, lune! 🌙")
|
||||||
|
|
Loading…
Reference in a new issue