-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (50 loc) · 1.98 KB
/
features.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
name: feature tests
# About security when running the tests and NOT exposing
# the secrets to externals. Currently Github Actions does
# NOT expose the secrets if the branch is coming from a forked
# repository.
# See: https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
# See: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions
#
# An alternate would be to set, pull_request_target but this takes the CI code
# from master removing the ability to change the code in a PR easily.
#
# Aditionally, since 2021 pull requests from new contributors will not
# trigger workflows automatically but will wait for approval from somebody
# with write access.
# See: https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks
on:
pull_request:
branches: [main]
env:
SOURCE: /usr/src/connect-ng
ARTIFACT_SOURCE: artifacts
BETA_VALID_REGCODE: ${{ secrets.BETA_VALID_REGCODE }}
VALID_REGCODE: ${{ secrets.VALID_REGCODE }}
EXPIRED_REGCODE: ${{ secrets.EXPIRED_REGCODE }}
NOT_ACTIVATED_REGCODE: ${{ secrets.NOT_ACTIVATED_REGCODE }}
BETA_NOT_ACTIVATED_REGCODE: ${{ secrets.BETA_NOT_ACTIVATED_REGCODE }}
jobs:
feature-tests:
runs-on: ubuntu-latest
container:
image: registry.suse.com/bci/golang:1.21-openssl
options: --user root --privileged
steps:
- uses: actions/checkout@v4
- name: move source to /usr/src/connect-ng
run: |
[ -d $SOURCE ] && rm -r $SOURCE
cp -r $GITHUB_WORKSPACE $SOURCE
- name: build RPM package
run: bash build/ci/build-rpm
# - name: gather RPM build artifacts
# uses: actions/upload-artifact@v4
# with:
# name: connect-rpms
# path: ${{ env.SOURCE }}/${{ env.ARTIFACT_SOURCE }}/*.rpm
- name: configure Connect to run feature tests
run: bash build/ci/configure
- name: run feature tests
run: bash build/ci/run-feature-tests