-
Notifications
You must be signed in to change notification settings - Fork 205
CASSNODEJS-3: Public CI after Donation #454
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
Open
SiyaoIsHiding
wants to merge
16
commits into
apache:trunk
Choose a base branch
from
SiyaoIsHiding:asf-ci
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+211
−20
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d6511c6
init ASF CI on GA
SiyaoIsHiding 71e9605
no cache mvn
SiyaoIsHiding 4c59847
install java 8 after 11 and 17
SiyaoIsHiding 0eaf196
fix license header regrex
SiyaoIsHiding a78d2da
install simulacron jar
SiyaoIsHiding 9d51855
generate ssl artifacts and fmt
SiyaoIsHiding b89c8aa
add matrix
SiyaoIsHiding 2631b0c
upload and download test results for matrix
SiyaoIsHiding 033ba9e
git reset --hard 5aba922ac24354cbafbdb6ad7244cabfaf7685f1
SiyaoIsHiding a596250
SELECT tokens
SiyaoIsHiding c2d7458
revert ccm reset
SiyaoIsHiding cc44327
try dorny GA instead
SiyaoIsHiding 7961c0f
artifact?
SiyaoIsHiding 23688f3
enrico, xunit
SiyaoIsHiding 6052c00
multi reporter
SiyaoIsHiding 292025a
multi reporter
SiyaoIsHiding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,181 @@ | ||
| name: Unit and Integration Tests for Apache Cassandra NodeJS Driver | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| workflow_dispatch: # allow manual trigger from Actions page | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| checks: write | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| NODE_VERSION: ["20", "22", "24"] | ||
| SERVER_VERSION: ["3.11", "4.0", "4.1", "5.0"] # Cassandra minor versions | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # ---- Python for ccm ---- | ||
| - name: Set up Python 3.9.16 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.9.16" | ||
|
|
||
| - name: Install ccm | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| git clone --depth 1 --single-branch -b cassandra-test https://github.com/apache/cassandra-ccm.git | ||
| cd cassandra-ccm | ||
| pip install -r requirements.txt | ||
| ./setup.py install | ||
|
|
||
| # ---- Install required Zulu JDKs (8/11/17) and capture their homes ---- | ||
| - name: Install Zulu 11 | ||
| id: z11 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: zulu | ||
| java-version: "11" | ||
|
|
||
| - name: Install Zulu 17 | ||
| id: z17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: zulu | ||
| java-version: "17" | ||
|
|
||
| - name: Install Zulu 8 | ||
| id: z8 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: zulu | ||
| java-version: "8" | ||
|
|
||
| - name: Export JAVA*_HOME variables | ||
| run: | | ||
| echo "JAVA8_HOME=${{ steps.z8.outputs.path }}" >> "$GITHUB_ENV" | ||
| echo "JAVA11_HOME=${{ steps.z11.outputs.path }}" >> "$GITHUB_ENV" | ||
| echo "JAVA17_HOME=${{ steps.z17.outputs.path }}" >> "$GITHUB_ENV" | ||
| echo "JAVA_HOME=${{ steps.z8.outputs.path }}" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Generate SSL certificates | ||
| run: | | ||
| mkdir -p /home/runner/workspace/tools/ccm/ssl/ | ||
| cd /home/runner/workspace/tools/ccm/ssl/ | ||
| keytool -genkey \ | ||
| -keyalg RSA \ | ||
| -alias cassandra \ | ||
| -keystore keystore.jks \ | ||
| -storepass cassandra \ | ||
| -keypass cassandra \ | ||
| -validity 364635 \ | ||
| -dname "CN=Philip Thompson, OU=TE, O=DataStax, L=Santa Clara, ST=CA, C=TE" | ||
| keytool -export \ | ||
| -alias cassandra \ | ||
| -file cassandra.crt \ | ||
| -keystore keystore.jks \ | ||
| -storepass cassandra | ||
| openssl x509 \ | ||
| -inform der \ | ||
| -in cassandra.crt \ | ||
| -out cassandra.pem | ||
| keytool -genkeypair \ | ||
| -keyalg RSA \ | ||
| -alias client \ | ||
| -keystore truststore.jks \ | ||
| -storepass cassandra \ | ||
| -keypass cassandra \ | ||
| -validity 364635 \ | ||
| -dname "CN=Philip Thompson, OU=TE, O=DataStax, L=Santa Clara, ST=CA, C=TE" | ||
| keytool -importkeystore \ | ||
| -srckeystore truststore.jks \ | ||
| -destkeystore client.p12 \ | ||
| -srcstorepass cassandra \ | ||
| -deststorepass cassandra \ | ||
| -deststoretype PKCS12 | ||
| openssl pkcs12 \ | ||
| -in client.p12 \ | ||
| -passin pass:cassandra \ | ||
| -nokeys \ | ||
| -out client_cert.pem -legacy | ||
| openssl pkcs12 \ | ||
| -in client.p12 \ | ||
| -passin pass:cassandra \ | ||
| -nodes \ | ||
| -nocerts \ | ||
| -out client_key.pem -legacy | ||
|
|
||
| - name: Install Simulacron | ||
| run: | | ||
| wget https://github.com/datastax/simulacron/releases/download/0.12.0/simulacron-standalone-0.12.0.jar -O /home/runner/simulacron.jar | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.NODE_VERSION }} | ||
| cache: "npm" | ||
|
|
||
| - name: Resolve Cassandra latest patch version | ||
| env: | ||
| SERVER_VERSION: ${{ matrix.SERVER_VERSION }} | ||
| run: | | ||
| PATCH_SERVER_VERSION=$( | ||
| curl -s https://downloads.apache.org/cassandra/ \ | ||
| | grep -oP '(?<=href=")[0-9]+\.[0-9]+\.[0-9]+(?=)' \ | ||
| | sort -rV \ | ||
| | uniq -w 3 \ | ||
| | grep "^${SERVER_VERSION}\." | ||
| ) | ||
| echo "Resolved Cassandra ${SERVER_VERSION}.x -> ${PATCH_SERVER_VERSION}" | ||
| echo "CCM_VERSION=$PATCH_SERVER_VERSION" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Print environment | ||
| run: printenv | sort | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| npm install | ||
| npm install --no-save mocha-multi-reporters mocha-junit-reporter | ||
| echo '{ | ||
| "reporterEnabled": "spec, mocha-junit-reporter", | ||
| "mochaJunitReporterReporterOptions": { | ||
| "mochaFile": "test-results/results.xml" | ||
| } | ||
| }' > config.json | ||
|
|
||
| npx mocha test/unit test/integration/short --recursive --exit --reporter mocha-multi-reporters \ | ||
| --reporter-options configFile=config.json | ||
|
|
||
| - name: Upload Test Results | ||
| if: (!cancelled()) | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Test Results (Node.js ${{ matrix.NODE_VERSION }}, Cassandra ${{ matrix.SERVER_VERSION }}) | ||
| path: test-results/**/* | ||
|
|
||
| publish-test-results: | ||
| name: "Publish Tests Results" | ||
| needs: test | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| checks: write | ||
| pull-requests: write | ||
|
|
||
| if: (!cancelled()) | ||
|
|
||
| steps: | ||
| - name: Download Artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: artifacts | ||
|
|
||
| - name: Publish Test Results | ||
| uses: EnricoMi/publish-unit-test-result-action@v2 | ||
| with: | ||
| files: artifacts/**/*.xml | ||
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semi-nit: we should probably get Philip's name out of here... and remove references to DataStax as well