Skip to content

Commit

Permalink
Do not install ci scripts into bin/
Browse files Browse the repository at this point in the history
  • Loading branch information
felixsch committed Feb 6, 2024
1 parent ebed7b5 commit 9a56c1e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 41 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/features.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,57 @@
---

name: RMT feature tests

on:
pull_request:
branches: [master]

env:
SOURCE: /usr/src/rmt-server
SCC_USERNAME: ${{ secrets.SCC_USERNAME }}
SCC_PASSWORD: ${{ secrets.SCC_PASSWORD }}

jobs:
feature-tests:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: /usr/src/rmt-server
container:
image: registry.opensuse.org/systemsmanagement/scc/containers/15.5/rmt-ci-container:latest
options: --user root
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: rmt_features
MYSQL_USER: rmt
MYSQL_PASSWORD: rmt
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
# services:
# mysql:
# image: mysql:5.7
# env:
# MYSQL_DATABASE: rmt_features
# MYSQL_USER: rmt
# MYSQL_PASSWORD: rmt
# MYSQL_ROOT_PASSWORD: root
# ports:
# - 3306:3306
# options: >-
# --health-cmd="mysqladmin ping"
# --health-interval=10s
# --health-timeout=5s
# --health-retries=3
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: build rpm
- name: move source to /usr/src/rmt-server
run: |
[ -d $SOURCE ] && rm -r $SOURCE
cp -r $GITHUB_WORKSPACE $SOURCE
- name: install depdendencies
run: |
rmt-build-rpm
bundle install
- name: configure rmt
- name: build RPM package
run: |
rmt-configure
bash ci/rmt-build-rpm
- name: run feature tests
- name: configure RMT to run feature tests
run: |
rmt-run-feature-tests
bash ci/rmt-configure
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ clean:
rm -rf $(NAME)-$(VERSION)/

man:
bundle exec ronn --roff --pipe --manual RMT MANUAL.md > rmt-cli.8 && gzip -f rmt-cli.8
ronn --roff --pipe --manual RMT MANUAL.md > rmt-cli.8 && gzip -f rmt-cli.8
mv rmt-cli.8.gz package/obs

dist: clean man
Expand Down
18 changes: 1 addition & 17 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,5 @@ RUN zypper --non-interactive in make chrpath fdupes gcc libcurl-devel libffi-dev
RUN update-alternatives --install /usr/bin/bundle bundle /usr/bin/bundle.ruby2.5 5 && \
update-alternatives --install /usr/bin/bundler bundler /usr/bin/bundler.ruby2.5 5

VOLUME /usr/src/rmt-server
VOLUME /usr/

ARG SCC_USERNAME
ARG SCC_PASSWORD

# Prepare ruby environment
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES 1

# Add rmt ci/development scripts
RUN mkdir -p /usr/src/rmt-server /usr/local/bin

COPY rmt-build-rpm /usr/local/bin/
COPY rmt-configure /usr/local/bin/
COPY rmt-console /usr/local/bin/
COPY rmt-run-feature-tests /usr/local/bin/

RUN mkdir /usr/src/rmt-server
WORKDIR /usr/src/rmt-server

0 comments on commit 9a56c1e

Please sign in to comment.