Skip to content

Commit

Permalink
add if
Browse files Browse the repository at this point in the history
  • Loading branch information
catdance124 committed Feb 12, 2024
1 parent 01b8830 commit 7c0d505
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
deploy:
needs: test
runs-on: ubuntu-latest
if: ${{ secrets.ACCESS_TOKEN && secrets.ID_TOKEN && secrets.REFRESH_TOKEN && secrets.CLIENT_ID && secrets.CLIENT_SECRET && secrets.MASTER_SCRIPT_ID && secrets.MASTER_DEPLOYMENT_ID }}

env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
deploy:
needs: test
runs-on: ubuntu-latest
if: ${{ secrets.ACCESS_TOKEN && secrets.ID_TOKEN && secrets.REFRESH_TOKEN && secrets.CLIENT_ID && secrets.CLIENT_SECRET && secrets.STAGING_SCRIPT_ID && secrets.STAGING_DEPLOYMENT_ID }}

env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
Expand Down
Empty file removed sources/tests/.gitkeep
Empty file.
10 changes: 10 additions & 0 deletions sources/tests/main.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { main } from "../src/main";

describe("main", () => {
it('should log "Hello, world!"', () => {
const consoleSpy = jest.spyOn(console, "log");
main();
expect(consoleSpy).toHaveBeenCalledWith("Hello, world!");
consoleSpy.mockRestore();
});
});

0 comments on commit 7c0d505

Please sign in to comment.