test
This commit is contained in:
parent
e0e4c0650d
commit
a58ec8e125
4 changed files with 10 additions and 0 deletions
40
test.yml
40
test.yml
|
|
@ -1,40 +0,0 @@
|
|||
name: Compile Rust Code on Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Rust with Alpine
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v ${{ github.workspace }}:/usr/src/myapp \
|
||||
-w /usr/src/myapp \
|
||||
rust:alpine \
|
||||
sh -c "apk add --no-cache musl-dev && cargo build --release"
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v ${{ github.workspace }}:/usr/src/myapp \
|
||||
-w /usr/src/myapp \
|
||||
rust:alpine \
|
||||
sh -c "apk add --no-cache musl-dev && cargo test --release"
|
||||
|
||||
- name: Package Artifacts
|
||||
run: |
|
||||
mkdir -p artifacts
|
||||
cp target/release/your_executable artifacts/
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: rust-release-artifacts
|
||||
path: artifacts/
|
||||
Loading…
Add table
Add a link
Reference in a new issue