ci: use forgejo workflows
This commit is contained in:
parent
a3a19c610d
commit
522ded016a
2 changed files with 45 additions and 22 deletions
45
.forgejo/workflows/rust.yml
Normal file
45
.forgejo/workflows/rust.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
name: build
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
test-debian:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: rust:latest
|
||||||
|
steps:
|
||||||
|
- name: prepare packages
|
||||||
|
run: |
|
||||||
|
apt update && \
|
||||||
|
apt -y install git cargo
|
||||||
|
|
||||||
|
- name: checkout
|
||||||
|
run: |
|
||||||
|
git init
|
||||||
|
git remote add origin ${FORGEJO_SERVER_URL}/${FORGEJO_REPOSITORY}
|
||||||
|
git fetch origin
|
||||||
|
git fetch origin ${FORGEJO_REF}
|
||||||
|
git checkout ${FORGEJO_REF_NAME}
|
||||||
|
|
||||||
|
- name: build the package
|
||||||
|
run: cargo test --verbose -- --no-capture
|
||||||
|
test-alpine:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: rust:alpine3.23
|
||||||
|
steps:
|
||||||
|
- name: prepare packages
|
||||||
|
run: |
|
||||||
|
apk update && \
|
||||||
|
apk --interactive=no add git cargo
|
||||||
|
|
||||||
|
- name: checkout
|
||||||
|
run: |
|
||||||
|
git init
|
||||||
|
git remote add origin ${FORGEJO_SERVER_URL}/${FORGEJO_REPOSITORY}
|
||||||
|
git fetch origin
|
||||||
|
git fetch origin ${FORGEJO_REF}
|
||||||
|
git checkout ${FORGEJO_REF_NAME}
|
||||||
|
|
||||||
|
- name: build the package
|
||||||
|
run: cargo test --verbose -- --no-capture
|
||||||
|
|
||||||
22
.github/workflows/rust.yml
vendored
22
.github/workflows/rust.yml
vendored
|
|
@ -1,22 +0,0 @@
|
||||||
name: Rust
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --verbose
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --verbose -- --no-capture
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue