rzo1 commented on code in PR #209: URL: https://github.com/apache/openjpa/pull/209#discussion_r4227758533
########## .github/workflows/databases.yml: ########## @@ -0,0 +1,143 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for additional +# information regarding copyright ownership. The ASF licenses this file to you +# under the Apache License, Version 2.0 (the # "License"); you may not use this +# file except in compliance with the License. You may obtain a copy of the License +# at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# +# The pull request build covers Derby and H2 only. This workflow runs the other +# dictionaries on a schedule, because defects that are invisible on Derby and H2 +# reach master otherwise - see OPENJPA-3009 (a JPQL LIKE pattern matched only on +# Derby) and OPENJPA-3010 (tests asserting the SQL shape Derby and H2 emit). +# +# One job per database: MySQL and MariaDB both listen on 3306, and a service +# container cannot be chosen per matrix entry. The credentials below are the ones +# the corresponding profile in pom.xml expects. +# +name: Databases +on: + schedule: + # Mondays, 04:17 UTC. A quarter past the hour avoids the load peak at :00. Review Comment: Added — a `check` job now gates the three database jobs. A scheduled run is skipped when the newest commit is more than seven days old, i.e. when the previous weekly run already tested the same tree; a manual run always proceeds. I exercised the decision in a shell harness for all four cases (manual on a branch, scheduled off the default branch, scheduled with a recent commit, scheduled with a stale tree) and it chooses as intended. ########## .github/workflows/databases.yml: ########## @@ -0,0 +1,143 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for additional +# information regarding copyright ownership. The ASF licenses this file to you +# under the Apache License, Version 2.0 (the # "License"); you may not use this +# file except in compliance with the License. You may obtain a copy of the License +# at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# +# The pull request build covers Derby and H2 only. This workflow runs the other +# dictionaries on a schedule, because defects that are invisible on Derby and H2 +# reach master otherwise - see OPENJPA-3009 (a JPQL LIKE pattern matched only on +# Derby) and OPENJPA-3010 (tests asserting the SQL shape Derby and H2 emit). +# +# One job per database: MySQL and MariaDB both listen on 3306, and a service +# container cannot be chosen per matrix entry. The credentials below are the ones +# the corresponding profile in pom.xml expects. +# +name: Databases +on: + schedule: + # Mondays, 04:17 UTC. A quarter past the hour avoids the load peak at :00. Review Comment: Addressed. The `check` job refuses a scheduled run on anything but the default branch, so a fork or a long-lived branch cannot start a weekly build; GitHub also only fires `schedule` on the default branch, so this is a belt-and-braces guard, and the file now says so. I deliberately left `workflow_dispatch` usable from any branch: being able to run the MySQL or PostgreSQL suite on a branch before merging is the main reason for the manual trigger, and it is exactly what would have caught OPENJPA-3009 and OPENJPA-3010 earlier. Happy to restrict that too if you would rather it never ran outside master. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
