Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into more-IO-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DavyLandman committed Jan 24, 2023
2 parents a0926a4 + 2cdd87a commit 30d24a7
Show file tree
Hide file tree
Showing 1,584 changed files with 24,537 additions and 52,424 deletions.
10 changes: 9 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
coverage:
precision: 0

status:
project:
default:
# basic
target: auto
threshold: 1% # we accept a bit fluctuation, as we run random tests
base: auto
paths:
- "src"
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ First a "pre-release" of the supporting compiler/typechecker tools must be done,
- [ ] syntax highlighting in editor works
- [ ] add dependency on another project by editing `RASCAL.MF`: `Required-Libraries: |lib://otherProject|`, import a module and test the type-checker as well as the interpreter for correct resolution
- [ ] `import demo::lang::Pico::Plugin; registerPico();` and test the editor of the example pico files (syntax highlighting, menu options)
- [ ] open tutor view and test the search box
- [ ] open tutor view and test browsing the documentation
- [ ] `import demo::lang::Pico::Plugin; rascal>:edit demo::lang::Pico::Plugin`
- [ ] edit a .concept file, save it and watch the preview in the Tutor Preview view
- [ ] Tutor Preview "edit" button opens the corresponding concept file of the currently visited Concept URL
- [ ] Tutor Preview Forward/Back/Refresh buttons work

# Actual release

- [ ] release rascal project (when resolving SNAPSHOT dependencies choose the right versions of vallang etc, and make sure to bump the new rascal SNAPSHOT release one minor version)
Expand Down
111 changes: 83 additions & 28 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,90 @@ env:
MAVEN_OPTS: "-Xmx4G -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"

jobs:
builds:
test-linux:
if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }}
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'

- name: Run Tests
run: mvn -B -Drascal.compile.skip -Drascal.tutor.skip -Drascal.test.memory=14 test

- uses: codecov/codecov-action@v3
continue-on-error: true # sometimes this one fails, that shouldn't stop a build
with:
token: e8b4481a-d178-4148-a4ff-502906390512

- name: Publish Test Report on github action
if: ${{ always() && github.event_name != 'pull_request' }} # to bad this doesn't work nicely with external pull requests
continue-on-error: true # sometimes this one fails, that shouldn't stop a build
uses: scacap/action-surefire-report@v1
with:
check_name: "Test Report - ${{ runner.os }}"

- name: Report Failure
if: failure()
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.RASCAL_SLACK_WEBHOOK }}

- name: Cache Maven packages
uses: actions/cache@v2
builds:
if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }}
needs: [test-linux]
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: 1047731 # v107
- run: which chrome
- uses: nanasess/setup-chromedriver@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
chromedriver-version: '107.0.5304.62'
- run: which chromedriver

- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'

- name: Compile & Bootstrap
run: mvn -B compile
run: mvn -B compile -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -Dwebdriver.chrome.browser=`which chrome`
env:
MAVEN_OPTS: "-Xmx14G -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"

- name: Test if release # just to be extra sure for a release
if: startsWith(github.ref, 'refs/tags/v')
run: mvn -Drascal.test.memory=4 -Drascal.compile.skip test
run: mvn -Drascal.test.memory=10 -Drascal.compile.skip -Drascal.tutor.skip test

- name: Attach artifact
- name: Attach artifact
id: build-artifact
uses: SWAT-engineering/maven-full-artifacts-action@v1
with:
maven-options: |
-Drascal.compile.skip
-Drascal.tutor.skip
-DskipTests
- name: Making sure test have succeeded in the parallel jobs
if: startsWith(github.ref, 'refs/tags/')
uses: yogeshlonkar/wait-for-jobs@v0
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
jobs: |
tests (macos-latest)
tests (windows-latest)
tests (buildjet-4vcpu-ubuntu-2204-arm)
ttl: 15

- name: Prepare Draft Release
uses: softprops/action-gh-release@v1
Expand Down Expand Up @@ -73,34 +129,33 @@ jobs:

tests:
if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }}
needs: [test-linux]
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest, macos-latest, buildjet-4vcpu-ubuntu-2204-arm]
env:
MAVEN_OPTS: "-Xmx1G -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
distribution: 'temurin'
cache: 'maven'

- name: Run Tests
# single quotes to help windows deal with argument splitting
run: mvn -B '-Drascal.compile.skip' '-Drascal.test.memory=4' test
run: mvn -B '-Drascal.compile.skip' '-Drascal.tutor.skip' '-Drascal.test.memory=3' test

- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v3
continue-on-error: true # sometimes this one fails, that shouldn't stop a build
with:
token: e8b4481a-d178-4148-a4ff-502906390512

- name: Publish Test Report on github action
if: ${{ always() && github.event_name != 'pull_request' }} # to bad this doesn't work nicely with external pull requests
continue-on-error: true # sometimes this one fails, that shouldn't stop a build
uses: scacap/action-surefire-report@v1
with:
check_name: "Test Report - ${{ runner.os }}"
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ local.properties
target/
bin/
bootstrap/
pom.xml.releaseBackup
release.properties

.DS_Store
/.apt_generated/

dependency-reduced-pom.xml
.ipynb_checkpoints
.vscode/settings.json

*.iml
.idea/
4 changes: 2 additions & 2 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
</natures>
<filteredResources>
<filter>
<id>1606738956816</id>
<id>1666611214669</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
Expand Down
Loading

0 comments on commit 30d24a7

Please sign in to comment.