Consolidate CI workflows, fix test

This commit is contained in:
Filip Tibell 2023-01-18 20:55:27 -05:00
parent 8078425b2d
commit 7bc13ec66b
No known key found for this signature in database
4 changed files with 24 additions and 60 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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", {
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
if result.ok then
print(result.stdout)
else
else
print(result.stderr)
process.exit(result.code)
end
end
print("\nGoodbye, lune! 🌙")