Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
GarretTomlin committed Sep 15, 2023
1 parent 3dad45a commit 86d32be
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 106 deletions.
Binary file added .DS_Store
Binary file not shown.
121 changes: 64 additions & 57 deletions .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,62 +24,69 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install dependencies
run: bun install

- name: Run tests
env:
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/mydb'
run: bun test


- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install dependencies
run: yarn install

- name: Run tests
env:
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/mydb'
run: yarn test

- name: Run packageChanges and publishPackage
run: |
if [ ${{ job.status }} == 'success' ]; then
echo "Build job succeeded, running packageChanges and publishPackage"
else
echo "Build job failed, skipping packageChanges and publishPackage"
fi
packageChanges:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Navigate to Package Directory
run: |
cd packages/
yarn install --frozen-lockfile
yarn run lint && yarn run build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x

- name: run
run: |
yarn install --frozen-lockfile
yarn run lint && yarn run build
publishPackage:
needs: packageChanges
if: needs.packageChanges.result == 'success' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Authenticate with NPM
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> ~/.npmrc
- name: Create Release Pull Request or Publish
id: changesets

run: |
cd packages/
yarn install --frozen-lockfile
yarn run release
env:
GITHUB_TOKEN: ${{ secrets.GGITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
needs: packageChanges
if: needs.packageChanges.result == 'success' && github.ref == 'refs/heads/main'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x

- name: Authenticate with NPM
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> ~/.npmrc

- name: Create Release Pull Request or Publish
id: changesets
run: |
yarn install --frozen-lockfile
yarn run release
env:
GITHUB_TOKEN: ${{ secrets.GGITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Binary file modified bun.lockb
Binary file not shown.
15 changes: 0 additions & 15 deletions tests/migrations/20230912165922507-testing.ts

This file was deleted.

14 changes: 14 additions & 0 deletions tests/migrations/20230913181627990-bew.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Kysely } from 'kysely';

export async function up(database: Kysely<unknown>): Promise<void> {
await database.schema
.createTable('bew')
.addColumn('id', 'serial', (column) => column.primaryKey())
.addColumn('name', 'text', (column) => column.notNull())
.execute();
}

export async function down(database: Kysely<unknown>): Promise<void> {
database.schema.dropTable('bew');
}

34 changes: 0 additions & 34 deletions tests/run-all-migrations.test.ts

This file was deleted.

0 comments on commit 86d32be

Please sign in to comment.