Skip to content

Commit

Permalink
Merge branch 'main' into 404
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Jul 11, 2023
2 parents db8bc0d + 545e035 commit 770f1b9
Show file tree
Hide file tree
Showing 1,902 changed files with 15,275 additions and 41,789 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
build/
dist/
out/

# DSL
/DSL/vitest.config.ts
6 changes: 1 addition & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ updates:
interval: 'monthly'

# DSL
- package-ecosystem: 'gradle'
directory: '/DSL'
schedule:
interval: 'monthly'
- package-ecosystem: 'npm'
directory: '/DSL/com.larsreimann.safeds.vscode'
directory: '/DSL'
schedule:
interval: 'monthly'

Expand Down
2 changes: 2 additions & 0 deletions .github/linters/.ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ ignore = [
"FBT002",
# builtin-attribute-shadowing (not an issue)
"A003",
# implicit-return (can add a return even though all cases are covered)
"RET503",
# superfluous-else-return (sometimes it's more readable)
"RET505",
# superfluous-else-raise (sometimes it's more readable)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.4.1
- uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/Safe-DS/projects/3
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
73 changes: 22 additions & 51 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,47 @@ on:
branches: [ main ]

jobs:
# Build and test DSL component
# Build and test the DSL component
build-dsl:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./DSL

strategy:
matrix:
java-version: [ 17 ]
node-version: [ 18.x ]

steps:
- name: Checkout repository
- name: Checkout source
uses: actions/checkout@v3

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
cache: gradle
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: DSL/package-lock.json

- name: Install dependencies
run: npm ci

- name: Generate Langium files
run: npm run langium:generate

# See https://docs.github.com/en/actions/guides/building-and-testing-java-with-gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Compile TypeScript
run: npm run build

- name: Test with Gradle
run: ./gradlew check koverMergedXmlReport
- name: Test with Vitest
run: npm run test-with-coverage

- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: DSL/build/reports/kover/merged/xml
files: report.xml
directory: DSL/coverage
files: coverage-final.json

# Build and test Runner component
build-runner:
Expand All @@ -54,39 +61,3 @@ jobs:
coverage: ${{ matrix.python-version == '3.10' }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# Build and test the DSL port to Langium
build-dsl-langium:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./DSL-langium

strategy:
matrix:
node-version: [ 18.x ]

steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: DSL-langium/package-lock.json

- name: Install dependencies
run: npm ci

- name: Test with Vitest
run: npm run test-with-coverage

- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: DSL-langium/coverage
files: clover.xml
6 changes: 5 additions & 1 deletion .github/workflows/megalinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: MegaLinter

on:
pull_request:
branches: [main]
branches: [ main ]

jobs:
megalinter:
uses: lars-reimann/.github/.github/workflows/megalinter-reusable.yml@main
permissions:
contents: write
issues: write
pull-requests: write
secrets:
PAT: ${{ secrets.PAT }}
78 changes: 19 additions & 59 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,41 @@ jobs:
defaults:
run:
working-directory: ./DSL

strategy:
matrix:
java-version: [17]
node-version: [ 18.x ]

steps:
- name: Checkout repository
- name: Checkout source
uses: actions/checkout@v3

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
cache: gradle
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: DSL/package-lock.json

# See https://docs.github.com/en/actions/guides/building-and-testing-java-with-gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Install dependencies
run: npm ci

- name: Test with Gradle
run: ./gradlew build koverMergedXmlReport
- name: Generate Langium files
run: npm run langium:generate

- name: Upload test report
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: Test report
# upload-artifact does not use working-directory
path: |
DSL/com.larsreimann.safeds/build/reports/tests/test/
DSL/com.larsreimann.safeds.ide/build/reports/tests/test/
- name: Compile TypeScript
run: npm run build

- name: Test with Vitest
run: npm run test-with-coverage

- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: DSL/build/reports/kover/merged/xml
files: report.xml
directory: DSL/coverage
files: coverage-final.json

# Build and test Runner component
build-runner:
Expand All @@ -70,39 +66,3 @@ jobs:
coverage: ${{ matrix.python-version == '3.10' }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# Build and test the DSL port to Langium
build-dsl-langium:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./DSL-langium

strategy:
matrix:
node-version: [ 18.x ]

steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: DSL-langium/package-lock.json

- name: Install dependencies
run: npm ci

- name: Test with Vitest
run: npm run test-with-coverage

- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: DSL-langium/coverage
files: clover.xml
12 changes: 2 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Eclipse (also used by Gradle support in VS Code)
.settings/
.classpath
.project

# IntelliJ
.idea/
*.iml
Expand All @@ -12,16 +7,13 @@

# Compilation/build outputs
/DSL/**/bin/
/DSL-langium/**/generated/
/DSL/**/generated/
build/
coverage/
dist/
dist-ssr/
out/

# Gradle
.gradle/

# Node
.npm/
node_modules/
Expand All @@ -48,5 +40,5 @@ report/
megalinter-reports/

# Other
.DS_Store/
.DS_Store
*.log
5 changes: 2 additions & 3 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
EXTENDS: https://raw.githubusercontent.com/lars-reimann/.github/main/.mega-linter.yml

# Config
FILTER_REGEX_EXCLUDE: (\.github/workflows/|DSL/com\.larsreimann\.safeds/src/test/resources/|mkdocs.yml)
FILTER_REGEX_EXCLUDE: (\.github/workflows/|DSL/syntaxes/|DSL/tests/resources/|mkdocs.yml)

# Workaround to also run prettier on other supported file types. We deactivate it for Markdown compared to the extended
# configuration since it breaks admonitions of Material for MkDocs.
Expand All @@ -17,5 +17,4 @@ JSON_PRETTIER_FILE_EXTENSIONS:

# Commands
PRE_COMMANDS:
- command: npm install @lars-reimann/eslint-config @lars-reimann/prettier-config
cwd: workspace
- command: npm i @lars-reimann/eslint-config @lars-reimann/prettier-config
3 changes: 0 additions & 3 deletions DSL-langium/bin/cli

This file was deleted.

25 changes: 0 additions & 25 deletions DSL-langium/language-configuration.json

This file was deleted.

Loading

0 comments on commit 770f1b9

Please sign in to comment.