소스 검색

Issue 4577 - Add GitHub actions

Description:
* Update GH actions to use ubuntu-latest
* Update pytest workflow to also run nightly
* Add SKIP_AUDIT_CI=1 to copr builds
* Add npm audit-ci workflow
* Add badges with test status to README.md

Relates: https://github.com/389ds/389-ds-base/issues/4577
Relates: https://github.com/389ds/389-ds-base/issues/4901

Reviewed by: mreynolds (Thanks!)
Viktor Ashirov 4 년 전
부모
커밋
0d907a97ee
5개의 변경된 파일41개의 추가작업 그리고 14개의 파일을 삭제
  1. 1 1
      .copr/Makefile
  2. 10 10
      .github/workflows/compile.yml
  3. 20 0
      .github/workflows/npm.yml
  4. 7 3
      .github/workflows/pytest.yml
  5. 3 0
      README.md

+ 1 - 1
.copr/Makefile

@@ -5,7 +5,7 @@ srpm:
 	dnf install -y dnf-plugins-core
 	dnf builddep -y --skip-broken --spec rpmbuild/SPECS/389-ds-base.spec --best --allowerasing --setopt=install_weak_deps=False
 	# Generate srpm
-	make -f rpm.mk srpms
+	SKIP_AUDIT_CI=1 make -f rpm.mk srpms
 	
 	if [[ "${outdir}" != "" ]]; then \
 	        mv dist/srpms/* ${outdir}; \

+ 10 - 10
.github/workflows/compile.yml

@@ -10,20 +10,20 @@ jobs:
       fail-fast: false
       matrix:
         name:
-          - Fedora 33 GCC
-          - Fedora 33 GCC Strict
-          - Fedora 33 GCC Static Analyzer
-          - Fedora 33 Clang
-          - Fedora 33 Clang -Weverything
+          - GCC
+          - GCC Strict
+          - GCC Static Analyzer
+          - Clang
+          - Clang -Weverything
 
         include:
-          - name: Fedora 33 GCC
+          - name: GCC
             image: quay.io/389ds/ci-images:fedora
             compiler: gcc
             cpp-compiler: g++
             cflags:  "-O2 -g"
 
-          - name: Fedora 33 GCC strict
+          - name: GCC strict
             image: quay.io/389ds/ci-images:fedora
             compiler: gcc
             cpp-compiler: g++
@@ -31,19 +31,19 @@ jobs:
             -Wstrict-prototypes -Wstrict-overflow=5 -Wwrite-strings -Winit-self \
             -Wuninitialized -Wno-sign-compare -Wshadow -Wformat-security"
 
-          - name: Fedora 33 GCC Static Analyzer
+          - name: GCC Static Analyzer
             image: quay.io/389ds/ci-images:fedora
             compiler: gcc
             cpp-compiler: g++
             cflags:  "-O2 -g -fanalyzer"
 
-          - name: Fedora 33 Clang
+          - name: Clang
             image: quay.io/389ds/ci-images:fedora
             compiler: clang
             cpp-compiler: clang++
             cflags: "-O2 -g -Qunused-arguments"
 
-          - name: Fedora 33 Clang -Weverything
+          - name: Clang -Weverything
             image: quay.io/389ds/ci-images:fedora
             compiler: clang
             cpp-compiler: clang++

+ 20 - 0
.github/workflows/npm.yml

@@ -0,0 +1,20 @@
+name: npm-audit-ci
+
+on:
+  push:
+  pull_request:
+  schedule:
+    - cron:  '0 0 * * *'
+
+jobs:
+  npm-audit-ci:
+    name: npm-audit-ci
+    runs-on: ubuntu-latest
+    container:
+      image: quay.io/389ds/ci-images:test
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Run NPM Audit CI
+        run: cd $GITHUB_WORKSPACE/src/cockpit/389-console && npx audit-ci --config audit-ci.json

+ 7 - 3
.github/workflows/pytest.yml

@@ -1,11 +1,15 @@
 name: Test
 
-on: [push, pull_request]
+on:
+  push:
+  pull_request:
+  schedule:
+    - cron:  '0 0 * * *'
 
 jobs:
   build:
     name: Build
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-latest
     container:
       image: quay.io/389ds/ci-images:test
     outputs:
@@ -32,7 +36,7 @@ jobs:
 
   test:
     name: Test
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-latest
     needs: build
     strategy:
       fail-fast: false

+ 3 - 0
README.md

@@ -1,6 +1,9 @@
 389 Directory Server
 ====================
 
+[![Test](https://github.com/389ds/389-ds-base/actions/workflows/pytest.yml/badge.svg)](https://github.com/389ds/389-ds-base/actions/workflows/pytest.yml)
+[![npm-audit-ci](https://github.com/389ds/389-ds-base/actions/workflows/npm.yml/badge.svg)](https://github.com/389ds/389-ds-base/actions/workflows/npm.yml)
+
 389 Directory Server is a highly usable, fully featured, reliable
 and secure LDAP server implementation. It handles many of the
 largest LDAP deployments in the world.