-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from SciLifeLab/First_Draft
Merge First_Draft branch to main
- Loading branch information
Showing
8 changed files
with
1,293 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Clippy is a tool that runs a bunch of tests on the Rust code to catch common mistakes and discouraged patterns. | ||
|
||
name: Analyze with Rust Clippy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
rust-clippy-analyze: | ||
name: Run rust-clippy analyzing | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
components: clippy | ||
override: true | ||
|
||
- name: Install required cargo | ||
run: cargo install clippy-sarif sarif-fmt | ||
|
||
- name: Run rust-clippy | ||
run: | ||
cargo clippy | ||
--all-features | ||
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: rust-clippy-results.sarif | ||
wait-for-processing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Publish to Dockerhub | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'releases/**' | ||
- AddCIpipelines | ||
tags: | ||
- 'v*' #if a push with a version tag like v0.0.2 is recorded | ||
|
||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_to_registry: | ||
if: github.repository == 'SciLifeLab/umi-transfer' | ||
name: Push Docker image to Docker Hub / GitHub Docker Registry | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Change repo name to lowercase | ||
run: | | ||
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push dev image | ||
uses: docker/build-push-action@v2 | ||
if: github.event_name == 'push' | ||
with: | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKERHUB_USERNAME }}/umi-transfer:dev | ||
ghcr.io/${{ env.REPO_LOWERCASE }}:dev | ||
- name: Push release image | ||
uses: docker/build-push-action@v2 | ||
if: github.event_name == 'release' | ||
with: | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKERHUB_USERNAME }}/umi-transfer:${{ github.event.release.tag_name }} | ||
${{ secrets.DOCKERHUB_USERNAME }}/umi-transfer:latest | ||
ghcr.io/${{ env.REPO_LOWERCASE }}:${{ github.event.release.tag_name }} | ||
ghcr.io/${{ env.REPO_LOWERCASE }}:${{ github.sha }} | ||
ghcr.io/${{ env.REPO_LOWERCASE }}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Test successful compilation on Rust | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
target: wasm32-unknown-unknown | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build |
Oops, something went wrong.