-
Notifications
You must be signed in to change notification settings - Fork 2.4k
87 lines (84 loc) · 2.53 KB
/
test-core.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "Test suite"
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests
on:
push:
branches:
- dev
- release/*
paths-ignore:
- 'docs/**'
- 'help/**'
pull_request:
types: [opened, reopened, synchronize]
paths-ignore:
- 'docs/**'
- 'help/**'
- 'packaging/**'
- '.pkgr.yml'
permissions:
contents: read
jobs:
all:
name: Units + Features
if: github.repository == 'opf/openproject'
runs-on: [self-hosted, aws, ubuntu22, x64, 2XL]
timeout-minutes: 40
env:
DOCKER_BUILDKIT: 1
LOCAL_DEV_CHECK: 1
CI_RETRY_COUNT: 3
CAPYBARA_DOWNLOADED_FILE_DIR: /tmp/ci/downloads
CAPYBARA_AWS_ACCESS_KEY_ID: "${{ secrets.CAPYBARA_AWS_ACCESS_KEY_ID }}"
CAPYBARA_AWS_SECRET_ACCESS_KEY: "${{ secrets.CAPYBARA_AWS_SECRET_ACCESS_KEY }}"
steps:
- uses: actions/checkout@v4
- name: Cache GEM
uses: actions/cache@v3
with:
path: cache/bundle
key: gem-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
gem-
- name: Cache NPM
uses: actions/cache@v3
with:
path: cache/npm
key: npm-${{ hashFiles('frontend/package-lock.json') }}
restore-keys: |
npm-
- name: Cache ANGULAR
uses: actions/cache@v3
with:
path: cache/angular
key: angular-${{ hashFiles('frontend/package-lock.json') }}
restore-keys: |
angular-
- name: Cache TEST RUNTIME
uses: actions/cache@v3
with:
path: cache/runtime-logs
key: runtime-logs-${{ github.head_ref || github.ref }}-${{ github.ref }}
restore-keys: |
runtime-logs-${{ github.head_ref || github.ref }}-
runtime-logs-
- name: Build
run: bin/ci setup-tests
- name: APIv3 specification (OpenAPI 3.0)
run: bin/ci ./script/api/validate_spec
- name: Unit tests
run: bin/ci run-units
- name: Feature tests
run: bin/ci run-features
- name: Cleanup
if: ${{ always() }}
run: |
ls -al cache/runtime-logs || true
ls -al cache/ || true
du -sh cache/* || true
# github.head_ref is only availabe in PR context and if it is absent then github.run_id
# is used . And github.run_id is unique for each workflow run. So, this option makes
# sure that there is only one build running for a pull request and the build is attached
# to the last commit of the PR.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true