-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
152 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 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 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,54 @@ | ||
name: Atlas | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- .github/workflows/ci-atlas.yaml | ||
- 'migrations/*' | ||
pull_request: | ||
paths: | ||
- 'migrations/*' | ||
# Permissions to write comments on the pull request. | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
jobs: | ||
atlas: | ||
services: | ||
# Spin up a clickhouse:23.10 container to be used as the dev-database for analysis. | ||
clickhouse: | ||
image: clickhouse/clickhouse-server:23.10 | ||
env: | ||
CLICKHOUSE_DB: test | ||
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 | ||
CLICKHOUSE_PASSWORD: pass | ||
CLICKHOUSE_USER: root | ||
ports: | ||
- 9000:9000 | ||
options: >- | ||
--health-cmd "clickhouse-client --host localhost --query 'SELECT 1'" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ariga/setup-atlas@v0 | ||
with: | ||
cloud-token: ${{ secrets.ATLAS_CLOUD_TOKEN }} | ||
- uses: ariga/atlas-action/migrate/lint@v1 | ||
with: | ||
dir: 'file://migrations' | ||
dir-name: 'name' | ||
dev-url: 'clickhouse://root:pass@localhost:9000/test' | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- uses: ariga/atlas-action/migrate/push@v1 | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
dir: 'file://migrations' | ||
dir-name: 'name' | ||
dev-url: 'clickhouse://root:pass@localhost:9000/test' |
This file contains 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,53 @@ | ||
name: Atlas | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- .github/workflows/ci-atlas.yaml | ||
- 'migrations/*' | ||
pull_request: | ||
paths: | ||
- 'migrations/*' | ||
# Permissions to write comments on the pull request. | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
jobs: | ||
atlas: | ||
services: | ||
# Spin up a mcr.microsoft.com/mssql/server:2022-latest container to be used as the dev-database for analysis. | ||
sqlserver: | ||
image: mcr.microsoft.com/mssql/server:2022-latest | ||
env: | ||
ACCEPT_EULA: Y | ||
MSSQL_PID: Developer | ||
MSSQL_SA_PASSWORD: P@ssw0rd0995 | ||
ports: | ||
- 1433:1433 | ||
options: >- | ||
--health-cmd "/opt/mssql-tools/bin/sqlcmd -U sa -P P@ssw0rd0995 -Q \"SELECT 1\"" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ariga/setup-atlas@v0 | ||
with: | ||
cloud-token: ${{ secrets.ATLAS_CLOUD_TOKEN }} | ||
- uses: ariga/atlas-action/migrate/lint@v1 | ||
with: | ||
dir: 'file://migrations' | ||
dir-name: 'name' | ||
dev-url: 'sqlserver://sa:P@ssw0rd0995@localhost:1433/test' | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- uses: ariga/atlas-action/migrate/push@v1 | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
dir: 'file://migrations' | ||
dir-name: 'name' | ||
dev-url: 'sqlserver://sa:P@ssw0rd0995@localhost:1433/test' |
This file contains 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 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