diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 07181c0..c3927a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,40 +1,19 @@ name: Compile Rust Code on Release -on: - release: - types: [created] - +on: [push] jobs: - build: + lint&test: runs-on: ubuntu-latest - + container: + image: node:alpine 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/ - + - uses: actions/checkout@v4 + - run: apk add curl gcc rustup cargo rust + - run: cargo check + - run: cargo test + - run: cargo build --release - name: Upload Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: rust-release-artifacts - path: artifacts/ + name: wololo-app + path: target/release/wololo