chore: moved e2e to e2e/node

This commit is contained in:
alina 🌸 2024-04-22 00:05:08 +03:00
parent 9d114a3552
commit 40cc10cd87
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
47 changed files with 9 additions and 7 deletions

View file

@ -90,7 +90,7 @@ jobs:
API_ID: ${{ secrets.TELEGRAM_API_ID }}
API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: cd e2e && ./cli.sh ci
run: cd e2e/node && ./cli.sh ci
- name: Publish to canary NPM
if: github.repository == 'mtcute/mtcute' # do not run on forks
continue-on-error: true
@ -98,4 +98,4 @@ jobs:
NPM_TOKEN: ${{ secrets.CANARY_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY: 'https://npm.tei.su'
run: cd e2e && ./cli.sh ci-publish
run: cd e2e/node && ./cli.sh ci-publish

View file

@ -5,7 +5,7 @@ RUN apk add python3 make g++ && \
corepack enable && \
corepack prepare pnpm@8.7.1 --activate
COPY ../ /app/
COPY ../.. /app/
RUN pnpm install --frozen-lockfile && \
pnpm -C packages/tl run gen-code && \

View file

@ -12,8 +12,8 @@ services:
- mtcute-e2e
build:
build:
context: ..
dockerfile: e2e/Dockerfile.build
context: ../..
dockerfile: e2e/node/Dockerfile.build
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN}
networks:

View file

@ -18,7 +18,9 @@ execSync(`npm config set //${REGISTRY.replace(/^https?:\/\//, '')}/:_authToken $
const commit = CURRENT_COMMIT.slice(0, 7)
const myPkgJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'))
const packages = Object.keys(myPkgJson.dependencies).filter((x) => x.startsWith('@mtcute/')).map((x) => x.slice('@mtcute/'.length))
const packages = Object.keys(myPkgJson.dependencies)
.filter((x) => x.startsWith('@mtcute/'))
.map((x) => x.slice('@mtcute/'.length))
const workDir = path.join(__dirname, 'temp')
fs.mkdirSync(workDir, { recursive: true })

View file

@ -147,7 +147,7 @@ async function main(arg = process.argv[2]) {
const pkgVersion = require(`../packages/${pkg}/package.json`).version
const published = await checkVersion(pkg, pkgVersion)
if (published) {
if (published && !process.env.E2E) {
console.log('[i] %s is up to date', pkg)
continue
}