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

Update to Rust version 1.80 #1

Merged
merged 1 commit into from
Jul 29, 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
46 changes: 27 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ concurrency:

env:
CI: true
APP_NAME: "rustic-witcher"
ECR_REPO_NAME: "bluegroundltd/rustic-witcher"

jobs:
tests:
Expand All @@ -42,24 +40,34 @@ jobs:
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE }}
aws-region: eu-west-1
- name: Load CI_TOKEN
uses: bluegroundltd/gha-tooling/get-ssm-parameter@main
with:
ssm-parameter-path: ${{ secrets.CI_TOKEN_PATH }}
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ env.JENKINS_GITHUB_TOKEN }}
- uses: bluegroundltd/gha-tooling/short-sha@main
id: short-sha
- name: Determine Docker image tag
uses: bluegroundltd/gha-tooling/define-docker-image-tag@main
id: docker-image-tag
with:
main-branch-name: main
sha: ${{ steps.short-sha.outputs.short-sha }}
- uses: bluegroundltd/gha-tooling/build-and-push-docker-image@main
token: ${{ secrets.CI_TOKEN }}
- name: Determine short SHA
uses: actions/github-script@v7
id: determined-sha
with:
ecr-repo-name: ${{ env.ECR_REPO_NAME }}
image-tag: ${{ steps.docker-image-tag.outputs.docker-image-tag }}
cache-enabled: "true"
script: |
const { ref } = context
const isMainBranch = ref === 'refs/heads/main'

let tag;

if(isMainBranch) {
tag = `master`
} else {
tag = ref.startsWith('refs/pull/')
? context.payload.pull_request.head.sha
: context.sha
tag = tag.slice(0, 7)
}

core.setOutput('sha', tag)
- name: Upload to Blueground ECR
env:
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
DOCKER_IMAGE_TAG: ${{ steps.determined-sha.outputs.sha }}
run: |
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin ${{ env.ECR_REGISTRY }}
make build_and_push_docker_image_bg
15 changes: 7 additions & 8 deletions .github/workflows/format-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Format & Clippy Pipeline

on:
workflow_call:

env:
RUST_VERSION: 1.79.0
RUST_VERSION: 1.80.0

jobs:
format-and-clippy:
Expand All @@ -16,17 +18,14 @@ jobs:
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE }}
aws-region: eu-west-1
- name: Load CI_TOKEN
uses: bluegroundltd/gha-tooling/get-ssm-parameter@main
with:
ssm-parameter-path: ${{ secrets.CI_TOKEN_PATH }}
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ env.JENKINS_GITHUB_TOKEN }}
- uses: bluegroundltd/gha-tooling/setup-rust@main
token: ${{ secrets.CI_TOKEN }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
toolchain: ${{ env.RUST_VERSION }}
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
- name: Lint with Clippy
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/tests-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Tests Pipeline

on:
workflow_call:

env:
RUST_VERSION: 1.79.0
RUST_VERSION: 1.80.0

jobs:
tests:
Expand All @@ -16,21 +18,17 @@ jobs:
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE }}
aws-region: eu-west-1
- name: Load CI_TOKEN
uses: bluegroundltd/gha-tooling/get-ssm-parameter@main
with:
ssm-parameter-path: ${{ secrets.CI_TOKEN_PATH }}
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ env.JENKINS_GITHUB_TOKEN }}
- uses: bluegroundltd/gha-tooling/setup-rust@main
token: ${{ secrets.CI_TOKEN }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
toolchain: ${{ env.RUST_VERSION }}
- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v1
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
locked: true
- name: Run tests
run: cargo nextest run --all
Loading