mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 04:50:36 +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:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
ci:
|
||||
name: CI
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -22,5 +22,11 @@ jobs:
|
|||
- name: Rustfmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- name: Build
|
||||
run: cargo build --locked --verbose
|
||||
|
||||
- name: 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))
|
||||
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...")
|
||||
local result = process.spawn("ping", {
|
||||
"google.com",
|
||||
"-c 4",
|
||||
})
|
||||
if process.getEnvVar("GITHUB_ACTIONS") == nil then
|
||||
print("\nSending 4 pings to google...")
|
||||
local result = process.spawn("ping", {
|
||||
"google.com",
|
||||
"-c 4",
|
||||
})
|
||||
|
||||
if result.ok then
|
||||
print(result.stdout)
|
||||
else
|
||||
print(result.stderr)
|
||||
process.exit(result.code)
|
||||
if result.ok then
|
||||
print(result.stdout)
|
||||
else
|
||||
print(result.stderr)
|
||||
process.exit(result.code)
|
||||
end
|
||||
end
|
||||
|
||||
print("\nGoodbye, lune! 🌙")
|
||||
|
|
Loading…
Reference in a new issue