forked from agama-project/agama
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b13202
commit a97c465
Showing
8 changed files
with
871 additions
and
572 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,15 @@ | ||
#! /bin/bash | ||
|
||
# This helper script creates the "osc" configuration file with OBS credentials | ||
|
||
CONFIG_FILE="$HOME/.config/osc/oscrc" | ||
|
||
# do not overwrite the existing config accidentally | ||
if [ -e "$CONFIG_FILE" ]; then | ||
echo "ERROR: $CONFIG_FILE already exists" | ||
exit 1 | ||
fi | ||
|
||
TEMPLATE=$(dirname "${BASH_SOURCE[0]}")/oscrc.template | ||
mkdir -p $(dirname "$CONFIG_FILE") | ||
sed -e "s/@OBS_USER@/$OBS_USER/g" -e "s/@OBS_PASSWORD@/$OBS_PASSWORD/g" "$TEMPLATE" > "$CONFIG_FILE" |
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 @@ | ||
name: "migrate-wicked CI" | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
rust_ci: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install toolchain | ||
run: rustup toolchain install stable | ||
|
||
- name: Install dependencies | ||
run: sudo apt install libclang-dev libpam-dev | ||
|
||
- name: Install cargo-binstall | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-binstall | ||
|
||
- name: Install tarpaulin | ||
run: cargo-binstall --no-confirm cargo-tarpaulin | ||
|
||
- name: Unit tests | ||
run: cargo tarpaulin --color always --out xml | ||
|
||
- name: Lint tests | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Cargo clippy | ||
run: cargo clippy -- --no-deps -D warnings | ||
|
||
- name: Cargo clippy on unit tests | ||
run: cargo clippy -- --no-deps --cfg test -A unused_imports -D warnings | ||
|
||
- name: Coveralls GitHub Action | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
format: cobertura |
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,26 @@ | ||
name: "migrate-wicked CI - Integration Tests" | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Start container | ||
run: podman run --detach --name migrate-wicked -e CARGO_TERM_COLOR=always -v .:/checkout registry.opensuse.org/home/jcronenberg/github-ci/containers/opensuse/migrate-wicked-testing:latest | ||
|
||
- name: Build migrate-wicked | ||
run: podman exec migrate-wicked bash -c "cd /checkout/ && cargo build" | ||
|
||
- name: Run migration integration tests | ||
run: podman exec migrate-wicked bash -c "/checkout/tests/test.sh" |
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,59 @@ | ||
name: Update OBS Git Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- split_migration | ||
|
||
jobs: | ||
update_obs_package: | ||
# do not run in forks | ||
if: github.repository == 'jcronenberg/agama' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: registry.opensuse.org/opensuse/tumbleweed:latest | ||
|
||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure and refresh repositories | ||
# disable unused repositories to have a faster refresh | ||
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref | ||
|
||
- name: Install tools | ||
run: zypper --non-interactive install --no-recommends | ||
git | ||
obs-service-obs_scm | ||
obs-service-cargo_vendor | ||
obs-service-set_version | ||
obs-service-tar | ||
osc | ||
cpio | ||
|
||
- name: Configure osc | ||
run: .github/workflows/configure_osc.sh | ||
env: | ||
OBS_USER: ${{ secrets.OBS_USER }} | ||
OBS_PASSWORD: ${{ secrets.OBS_PW }} | ||
|
||
- name: Checkout package | ||
run: osc checkout home:jcronenberg:migrate-wicked/migrate-wicked-git -o migrate-wicked-git-package | ||
|
||
- name: Remove current obscpio | ||
run: rm -f *.obscpio | ||
working-directory: ./migrate-wicked-git-package | ||
|
||
- name: Run osc service manualrun | ||
run: osc service manualrun | ||
working-directory: ./migrate-wicked-git-package | ||
|
||
- name: Update current files in osc | ||
run: osc ar | ||
working-directory: ./migrate-wicked-git-package | ||
|
||
- name: Commit to OBS | ||
run: osc commit -m "$GITHUB_SHA" | ||
working-directory: ./migrate-wicked-git-package |
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,7 @@ | ||
[general] | ||
apiurl = https://api.opensuse.org | ||
|
||
[https://api.opensuse.org] | ||
user=@OBS_USER@ | ||
pass=@OBS_PASSWORD@ | ||
credentials_mgr_class=osc.credentials.PlaintextConfigFileCredentialsManager |
Oops, something went wrong.