diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..6842d1e --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,50 @@ +name: Rust-build + +on: + push: + branches: + - "main" + +jobs: + build: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: + + - name: Check-out + uses: actions/checkout@v3 + + - name: Install stable toolchain + uses: https://github.com/actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Run cargo check + uses: https://github.com/actions-rs/cargo@v1 + with: + command: check + + - name: Install nightly toolchain with clippy available + uses: https://github.com/actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: clippy + + - name: Run cargo clippy + uses: https://github.com/actions-rs/cargo@v1 + continue-on-error: true # WARNING: only for this example, remove it! + with: + command: clippy + args: -- -D warnings + + - name: Test + run: cargo test + + - name: Build + run: cargo build --release + diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml deleted file mode 100644 index ba7802e..0000000 --- a/.github/workflows/github-actions-demo.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: GitHub Actions Demo -run-name: ${{ gitea.actor }} is testing out GitHub Actions -on: [push] -jobs: - Explore-GitHub-Actions: - runs-on: ubuntu-latest - steps: - - run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo " This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo " The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v3 - - run: echo " The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo " The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo " This job's status is ${{ job.status }}." -