Skip to content

Commit

Permalink
Merge pull request #85 from bwks/ci-test
Browse files Browse the repository at this point in the history
testing ci
  • Loading branch information
bwks authored Jan 3, 2023
2 parents d26fd44 + 0a58e5a commit 7c54e28
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 13 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
outputs:
pkg-version: ${{ steps.pkg-version.outputs.PKG_VERSION }}
steps:
- uses: "actions/checkout@v3"
- name: "Check out the repo"
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -32,8 +33,11 @@ jobs:
needs: "get-tag"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "taiki-e/create-gh-release-action@v1"
- name: "Check out the repo"
uses: actions/checkout@v3

- name: "Create release"
uses: "taiki-e/create-gh-release-action@v1"
with:
# (optional) Path to changelog.
# changelog: CHANGELOG.md
Expand All @@ -44,7 +48,9 @@ jobs:
upload-assets:
name: "Upload assets to Github releases"
if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: "get-tag"
needs:
- "get-tag"
- "create-release"
strategy:
matrix:
include:
Expand All @@ -54,8 +60,11 @@ jobs:
os: "ubuntu-latest"
runs-on: ${{ matrix.os }}
steps:
- uses: "actions/checkout@v3"
- uses: "taiki-e/upload-rust-binary-action@v1"
- name: "Check out the repo"
uses: actions/checkout@v3

- name: "Upload Binaries"
uses: "taiki-e/upload-rust-binary-action@v1"
with:
bin: "shazam"
target: ${{ matrix.target }}
Expand All @@ -71,6 +80,9 @@ jobs:
- "upload-assets"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3

- name: "Log in to Docker Hub"
uses: "docker/login-action@v2"
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ jobs:
name: "Create tag"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: "Check out the repo"
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: "Get tag"
id: "get-tag"
shell: "bash"
run: |
echo PKG_VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml) >> $GITHUB_OUTPUT
- name: "Set Tag"
shell: "bash"
run: |
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ jobs:
name: "Cargo check"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: "Check out the repo"
uses: actions/checkout@v3

- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true

- uses: "actions-rs/cargo@v1"
with:
command: "check"
Expand All @@ -22,12 +25,15 @@ jobs:
name: "Cargo test"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: "Check out the repo"
uses: actions/checkout@v3

- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true

- uses: "actions-rs/cargo@v1"
with:
command: "test"
Expand All @@ -36,13 +42,17 @@ jobs:
name: "Cargo format"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: "Check out the repo"
uses: actions/checkout@v3

- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true

- run: "rustup component add rustfmt"

- uses: "actions-rs/cargo@v1"
with:
command: "fmt"
Expand All @@ -52,13 +62,17 @@ jobs:
name: "Cargo clippy"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: "Check out the repo"
uses: actions/checkout@v3

- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true

- run: "rustup component add clippy"

- uses: "actions-rs/cargo@v1"
with:
command: "clippy"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shazam"
version = "0.1.62"
version = "0.1.63"
edition = "2021"
authors = ["Bradley Searle"]
license = "MIT"
Expand Down

0 comments on commit 7c54e28

Please sign in to comment.