Skip to content

Commit

Permalink
Improve Github Actions (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
BanjoFox authored Jul 5, 2024
2 parents 48e64f9 + 88cd861 commit c28f9b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/aardwolf-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Build
name: CI Build
on:
push:
branches:
Expand All @@ -19,7 +19,7 @@ jobs:

steps:

- name: Checkout
- name: Checkout Repo
uses: actions/checkout@v4 # Marketplace - https://github.com/marketplace/actions/checkout
# Installs the most recent stable rust toolchain as of the specified time
# offset, which may be written in years, months, weeks, or days.
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
echo "DATABASE_URL=postgresql://aardwolf_user:[email protected]:5432/aardwolf_testing" > "$GITHUB_ENV"
echo "TEST_DATABASE_URL=postgresql://aardwolf_user:[email protected]:5432/aardwolf_testing" >> "$GITHUB_ENV"
# Install diesel CLI if not already installed
- name: Check diesel installation
- name: Check Diesel installation
run: if which diesel; then echo "diesel already installed"; else cargo install diesel_cli --no-default-features --features=postgres; fi

# Push the aardwolf-models directory, and run migrations
Expand All @@ -70,5 +70,5 @@ jobs:
popd
# Run cargo build
- name: Cargo build aardwolf
- name: Cargo build Aardwolf
run: cargo build
7 changes: 3 additions & 4 deletions .github/workflows/aardwolf-test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Test
name: CI Test

on:
workflow_run:
workflows:
- Build
workflows: ["CI build"]
types:
- completed

Expand All @@ -29,4 +28,4 @@ jobs:
# Run cargo test
- name: Cargo test Aardwolf
run: cargo test --all --verbose
run: cargo test --all --verbose
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: 'Docker Image CI'
on:
pull_request:
branches:
- main'
- 'main'
- 'banjofox/*'

jobs:
Expand All @@ -17,6 +17,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

0 comments on commit c28f9b2

Please sign in to comment.