Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Github Actions #325

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading