Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working on RDM 12 compatibility #3

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build and test

on:
workflow_call:
inputs:
oarepo:
description: OARepo version (11, 12, ...)
required: true
default: 11
type: string

env:
OAREPO_VERSION: ${{ inputs.oarepo }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144

- name: Runs Opensearch
uses: ankane/setup-opensearch@v1
with:
plugins: analysis-icu

- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}

- name: Run tests
run: |
./run-tests.sh

- name: Build package to publish
run: |
.venv-builder/bin/python setup.py sdist bdist_wheel

- name: Freeze packages
run: |
.venv-builder/bin/pip freeze > requirements.txt
.venv-tests/bin/pip freeze >>requirements.txt

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: requirements.txt
path: requirements.txt
92 changes: 0 additions & 92 deletions .github/workflows/main.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/manual.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Dispatch

on:
workflow_dispatch:
inputs:
oarepo:
description: OARepo version (11, 12, ...)
required: true
default: 11

jobs:
build:
uses: ./.github/workflows/build.yaml
with:
oarepo: ${{ github.event.inputs.oarepo }}
41 changes: 41 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build, test and publish

on: push

permissions:
id-token: write
contents: read

jobs:
build11:
uses: ./.github/workflows/build.yaml
with:
oarepo: 11

build12:
uses: ./.github/workflows/build.yaml
with:
oarepo: 12

publish:
runs-on: ubuntu-latest
needs: build11
steps:
- name: Use built artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist

- name: List files
run: |
ls -la
ls -la dist

- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ target/

tests/test.db

.venv
.venv*
.direnv

docs/migration/data
Expand All @@ -89,3 +89,5 @@ dist/

.model_venv/
.vscode

thesis
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive-include oarepo_requests *
prune tests
prune thesis
6 changes: 0 additions & 6 deletions oarepo_requests/components/__init__.py

This file was deleted.

126 changes: 0 additions & 126 deletions oarepo_requests/components/requests.py

This file was deleted.

Loading