Introduce Primer #16538
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
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' | |
# switch back to [self-hosted-autoscale] in case of issues with scaleway | |
runs-on: [self-hosted, scaleway, ubuntu22, x64, 2XL] | |
timeout-minutes: 40 | |
env: | |
DOCKER_BUILDKIT: 1 | |
LOCAL_DEV_CHECK: 1 | |
CI_CACHE_PATH: "/tmp/cache" | |
CI_RETRY_COUNT: 3 | |
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@v3 | |
- name: cache | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/cache | |
key: ${{ runner.os }}-ci-cache-tests-all-${{ github.ref }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-ci-cache-tests-all-${{ github.ref }}- | |
${{ runner.os }}-ci-cache-tests-all- | |
- name: build | |
run: docker-compose -f docker-compose.ci.yml build --pull ci | |
- name: tests | |
run: | | |
sudo mkdir -p /tmp/cache && sudo chown -R 1000:1000 $CI_CACHE_PATH | |
ls -lrt $CI_CACHE_PATH/op-cache/ || true | |
docker-compose -f docker-compose.ci.yml run ci setup-tests run-units run-features | |
- name: cleanup | |
if: ${{ always() }} | |
run: | | |
docker-compose -f docker-compose.ci.yml down --remove-orphans -t 10 | |
sudo chown -R $(id -u):$(id -g) $CI_CACHE_PATH | |
ls -lrt spec/support/turbo* | |
ls -lrt $CI_CACHE_PATH/op-cache/ || true | |
api-spec: | |
name: APIv3 specification (OpenAPI 3.0) | |
if: github.repository == 'opf/openproject' | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
- run: ./script/api/validate_spec |